summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-03-07 08:47:27 +0100
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commita30bc8a351b983725c082e603f311e17a6d0178e (patch)
tree8237c98e499b8d32658f2af8f5d6cec1a98882d5 /ipalib/errors.py
parent88c0b66abc69ea5ab4a5beb72a1de2c5a74fd0c6 (diff)
downloadfreeipa-a30bc8a351b983725c082e603f311e17a6d0178e.tar.gz
freeipa-a30bc8a351b983725c082e603f311e17a6d0178e.tar.xz
freeipa-a30bc8a351b983725c082e603f311e17a6d0178e.zip
plugable: switch API to Registry-based plugin discovery
Merge Registrar into Registry. Use the Registry instance of each plugin module to discover plugins in the module instead of the global Registrar instance. This removes the side-effect of all plugins in a module being re-registered every time the module is imported. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 52fa25f02..93333c2aa 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -236,6 +236,14 @@ class PluginsPackageError(PrivateError):
format = '%(name)s must be sub-package, not module: %(file)r'
+class PluginModuleError(PrivateError):
+ """
+ Raised when a module is not a valid plugin module.
+ """
+
+ format = '%(name)s is not a valid plugin module'
+
+
##############################################################################
# Public errors: