summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-12-28 01:21:27 +0100
committerJelmer Vernooij <jelmer@ganieda.vernstok.nl>2009-12-29 16:26:19 +0100
commit9b1a21031187e83de61d999b70a6d1cda7b68444 (patch)
tree753c2b8baf8509240685373f4b2344811e5f221f /source4/scripting/python
parentc064549e2e29b1a7e100300fa7d851451a90a6a7 (diff)
downloadsamba-9b1a21031187e83de61d999b70a6d1cda7b68444.tar.gz
samba-9b1a21031187e83de61d999b70a6d1cda7b68444.tar.bz2
samba-9b1a21031187e83de61d999b70a6d1cda7b68444.zip
net: Support usage/help of subcommands implemented in Python.
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py
index 54f3134d2f..f644febba6 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -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()