diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-08 23:26:17 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-08-08 23:26:17 +0000 |
commit | 45201e31c1b7be7cb770d2e864c307c95e743751 (patch) | |
tree | 25c976e1765f2421afb7cc01c59953543456819c /ipalib/plugable.py | |
parent | e3811f3f45adf977ade6468221368efb7f92294f (diff) | |
download | freeipa-45201e31c1b7be7cb770d2e864c307c95e743751.tar.gz freeipa-45201e31c1b7be7cb770d2e864c307c95e743751.tar.xz freeipa-45201e31c1b7be7cb770d2e864c307c95e743751.zip |
92: Added ProxyTarget.name property; added corresponding unit tests
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r-- | ipalib/plugable.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 581f377b..c5ceeffe 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -76,6 +76,13 @@ class ReadOnly(object): class ProxyTarget(ReadOnly): __public__ = frozenset() + def __get_name(self): + """ + Convenience property to return the class name. + """ + return self.__class__.__name__ + name = property(__get_name) + @classmethod def implements(cls, arg): assert type(cls.__public__) is frozenset |