diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-07-31 18:57:10 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-07-31 18:57:10 +0000 |
commit | d7569a84b94ab304a1b7f353ea71c15061ebd5d4 (patch) | |
tree | 3845f54c9c5767ab2bb003576d7e0a6e813a007e /ipalib/plugable.py | |
parent | bc1675dc3853748064dbf1485bf58bce0e344add (diff) | |
download | freeipa-d7569a84b94ab304a1b7f353ea71c15061ebd5d4.tar.gz freeipa-d7569a84b94ab304a1b7f353ea71c15061ebd5d4.tar.xz freeipa-d7569a84b94ab304a1b7f353ea71c15061ebd5d4.zip |
31: Renamed exceptions.py to errors.py
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 ba2241b9..0de31d82 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -22,7 +22,7 @@ Utility classes for registering plugins, base classe for writing plugins. """ import inspect -import exceptions +import errors @@ -50,7 +50,7 @@ class Registrar(object): for base in self.__allowed: if issubclass(cls, base): return base - raise exceptions.SubclassError(cls, self.__allowed) + raise errors.SubclassError(cls, self.__allowed) def __call__(self, cls, override=False): """ @@ -65,17 +65,17 @@ class Registrar(object): # Raise DuplicateError if this exact class was already registered: if cls in self.__registered: - raise exceptions.DuplicateError(cls) + raise errors.DuplicateError(cls) # Check override: if cls.__name__ in sub_d: # Must use override=True to override: if not override: - raise exceptions.OverrideError(base, cls) + raise errors.OverrideError(base, cls) else: # There was nothing already registered to override: if override: - raise exceptions.MissingOverrideError(base, cls) + raise errors.MissingOverrideError(base, cls) # The plugin is okay, add to __registered and sub_d: self.__registered.add(cls) |