From 9b1a21031187e83de61d999b70a6d1cda7b68444 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Dec 2009 01:21:27 +0100 Subject: net: Support usage/help of subcommands implemented in Python. --- source4/scripting/python/samba/netcmd/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/scripting/python') 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() -- cgit