summaryrefslogtreecommitdiffstats
path: root/ipalib/plugable.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-13 02:34:36 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-13 02:34:36 +0000
commit0fed74b56d1940f84e7b64c3661f21baabcb4616 (patch)
tree2c6ed1f682f9d39f8a3e80c5d3bad17bf0920181 /ipalib/plugable.py
parent69f7132365c4f369068b8e09921cd29ea92f3754 (diff)
downloadfreeipa.git-0fed74b56d1940f84e7b64c3661f21baabcb4616.tar.gz
freeipa.git-0fed74b56d1940f84e7b64c3661f21baabcb4616.tar.xz
freeipa.git-0fed74b56d1940f84e7b64c3661f21baabcb4616.zip
138: Added ProxyTarget.doc property; CLI.print_commands() now uses cmd.doc instead of cmd.get_doc()
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r--ipalib/plugable.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 89eb423b..fbe5e638 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -128,6 +128,7 @@ class Proxy(ReadOnly):
'__name_attr',
'__public__',
'name',
+ 'doc',
)
def __init__(self, base, target, name_attr='name'):
@@ -146,10 +147,11 @@ class Proxy(ReadOnly):
self.__target = target
self.__name_attr = name_attr
self.__public__ = base.__public__
- assert type(self.__public__) is frozenset
self.name = getattr(target, name_attr)
- check_identifier(self.name)
+ self.doc = target.doc
self.__lock__()
+ assert type(self.__public__) is frozenset
+ check_identifier(self.name)
def implements(self, arg):
"""
@@ -225,6 +227,13 @@ class ProxyTarget(ReadOnly):
return self.__class__.__name__
name = property(__get_name)
+ def __get_doc(self):
+ """
+ Convenience property to return the class docstring.
+ """
+ return self.__class__.__doc__
+ doc = property(__get_doc)
+
@classmethod
def implements(cls, arg):
"""