summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/netcmd
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-10-13 23:16:58 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-10-14 00:22:57 +0200
commitb5d59458012d1b9f91bd08f4c36fc108f23af19a (patch)
tree8b7cce003d19dff3774d21b2e8d1667122079c02 /source4/scripting/python/samba/netcmd
parent27afc3e578d38279085ad2984c8ff2f9e0484540 (diff)
downloadsamba-b5d59458012d1b9f91bd08f4c36fc108f23af19a.tar.gz
samba-b5d59458012d1b9f91bd08f4c36fc108f23af19a.tar.xz
samba-b5d59458012d1b9f91bd08f4c36fc108f23af19a.zip
samba.netcmd: Reintroduce Command.name.
Diffstat (limited to 'source4/scripting/python/samba/netcmd')
-rw-r--r--source4/scripting/python/samba/netcmd/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py
index 19fae071c6d..ad6e688da81 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -45,6 +45,14 @@ class Command(object):
full_description = property(_get_full_description)
+ def _get_name(self):
+ name = self.__class__.__name__
+ if name.startswith("cmd_"):
+ return name[4:]
+ return name
+
+ name = property(_get_name)
+
# synopsis must be defined in all subclasses in order to provide the
# command usage
synopsis = None