summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-03-15 14:01:17 +0100
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commit88c0b66abc69ea5ab4a5beb72a1de2c5a74fd0c6 (patch)
tree42ddad28e58e47374ba79ba7f37485690b195e7a /ipalib
parent15a4c0d2767c0a37d55463d4bba60442a83539bb (diff)
downloadfreeipa-88c0b66abc69ea5ab4a5beb72a1de2c5a74fd0c6.tar.gz
freeipa-88c0b66abc69ea5ab4a5beb72a1de2c5a74fd0c6.tar.xz
freeipa-88c0b66abc69ea5ab4a5beb72a1de2c5a74fd0c6.zip
plugable: remove the unused deprecated API.register method
https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugable.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipalib/plugable.py b/ipalib/plugable.py
index 260eb443b..ac28e57e2 100644
--- a/ipalib/plugable.py
+++ b/ipalib/plugable.py
@@ -94,7 +94,7 @@ class Registry(object):
"""
def __call__(self):
def decorator(cls):
- API.register(cls)
+ _register(cls)
return cls
return decorator
@@ -287,14 +287,14 @@ class Registrar(collections.Mapping):
def __len__(self):
return len(self.__registry)
+_register = Registrar()
+
class API(ReadOnly):
"""
Dynamic API object through which `Plugin` instances are accessed.
"""
- register = Registrar()
-
def __init__(self):
super(API, self).__init__()
self.__plugins = {}
@@ -582,9 +582,9 @@ class API(ReadOnly):
klass = getattr(module, name)
if not inspect.isclass(klass):
continue
- if klass not in self.register:
+ if klass not in _register:
continue
- kwargs = self.register[klass]
+ kwargs = _register[klass]
self.add_plugin(klass, **kwargs)
def add_plugin(self, klass, override=False):