1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-18 00:59:12 +03:00

net: Support usage/help of subcommands implemented in Python.

This commit is contained in:
Jelmer Vernooij
2009-12-28 01:21:27 +01:00
committed by Jelmer Vernooij
parent c064549e2e
commit 9b1a210311
2 changed files with 60 additions and 14 deletions

View File

@ -23,6 +23,9 @@ class Command(object):
def _get_description(self):
return self.__doc__
def usage(self):
raise NotImplementedError
description = property(_get_description)
def run(self):
@ -31,3 +34,4 @@ class Command(object):
commands = {}
commands["foo"] = Command()