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:
committed by
Jelmer Vernooij
parent
c064549e2e
commit
9b1a210311
@ -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()
|
||||
|
Reference in New Issue
Block a user