From b5d59458012d1b9f91bd08f4c36fc108f23af19a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 13 Oct 2011 23:16:58 +0200 Subject: samba.netcmd: Reintroduce Command.name. --- source4/scripting/python/samba/netcmd/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source4/scripting/python/samba/netcmd') diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py index 19fae071c6..ad6e688da8 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 -- cgit