summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-12-17 21:47:43 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-12-17 21:47:43 -0700
commit69041c3b1b2494d89097e490048c23292c8cbc52 (patch)
treeded37a0888618207720147fdcca1c5f7a3fa8b15 /ipalib
parentba481e7712b9d92694a38399936fd0eceef93cb6 (diff)
downloadfreeipa-69041c3b1b2494d89097e490048c23292c8cbc52.tar.gz
freeipa-69041c3b1b2494d89097e490048c23292c8cbc52.tar.xz
freeipa-69041c3b1b2494d89097e490048c23292c8cbc52.zip
Removed Plugin.name property and replaced with instance attribute created in Plugin.__init__()
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/frontend.py5
-rw-r--r--ipalib/plugable.py11
2 files changed, 7 insertions, 9 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index e4dd7637a..4ff77c59a 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -965,6 +965,7 @@ class Attribute(plugable.Plugin):
assert m
self.__obj_name = m.group(1)
self.__attr_name = m.group(2)
+ super(Attribute, self).__init__()
def __get_obj_name(self):
return self.__obj_name
@@ -1053,8 +1054,7 @@ class Method(Attribute, Command):
__public__ = Attribute.__public__.union(Command.__public__)
def __init__(self):
- Attribute.__init__(self)
- Command.__init__(self)
+ super(Method, self).__init__()
class Property(Attribute):
@@ -1087,6 +1087,7 @@ class Property(Attribute):
rules=self.rules,
normalize=self.normalize,
)
+ super(Property, self).__init__()
def __rules_iter(self):
"""
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 7dafd4401..2bed992de 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -254,17 +254,14 @@ class Plugin(ReadOnly):
__api = None
def __init__(self):
+ cls = self.__class__
+ self.name = cls.__name__
+ self.module = cls.__module__
+ self.fullname = '%s.%s' % (self.module, self.name)
log = logging.getLogger('ipa')
for name in ('debug', 'info', 'warning', 'error', 'critical'):
setattr(self, name, getattr(log, name))
- def __get_name(self):
- """
- Convenience property to return the class name.
- """
- return self.__class__.__name__
- name = property(__get_name)
-
def __get_doc(self):
"""
Convenience property to return the class docstring.