summaryrefslogtreecommitdiffstats
path: root/ipalib/base.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-07-20 03:48:36 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-07-20 03:48:36 +0000
commitc2df39156979ea5a01901b97504c1de276364dfc (patch)
tree1f0ff85090d7824907f82709c8280b6003251b9d /ipalib/base.py
parent370282819d7839e6e5091c019d6ff1b606add066 (diff)
downloadfreeipa-c2df39156979ea5a01901b97504c1de276364dfc.zip
freeipa-c2df39156979ea5a01901b97504c1de276364dfc.tar.gz
freeipa-c2df39156979ea5a01901b97504c1de276364dfc.tar.xz
14: Added Named.cli property that returns name.replace('_', '-'); Named.doc property now does a strip() to make it more user-friendly; added test_Named unit tests which somehow got dropped, uppdated with new Named properties
Diffstat (limited to 'ipalib/base.py')
-rw-r--r--ipalib/base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipalib/base.py b/ipalib/base.py
index 2769efd..ece446c 100644
--- a/ipalib/base.py
+++ b/ipalib/base.py
@@ -132,8 +132,12 @@ class Named(object):
return self.__class__.__name__
name = property(__get_name)
+ def __get_cli(self):
+ return self.name.replace('_', '-')
+ cli = property(__get_cli)
+
def __get_doc(self):
- return self.__class__.__doc__
+ return self.__class__.__doc__.strip()
doc = property(__get_doc)