diff options
Diffstat (limited to 'ipalib/plugable.py')
-rw-r--r-- | ipalib/plugable.py | 10 |
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): |