Implemented more elegant way for entire plugin module to be conditionally skipped; updated cert.py and ra.py modules to use this

This commit is contained in:
Jason Gerard DeRose
2009-02-12 02:10:12 -07:00
committed by Rob Crittenden
parent e0fe732318
commit 4ab133c3cb
7 changed files with 140 additions and 82 deletions

View File

@@ -208,6 +208,21 @@ class PluginMissingOverrideError(PrivateError):
format = '%(base)s.%(name)s not registered, cannot override with %(plugin)r'
class SkipPluginModule(PrivateError):
"""
Raised to abort the loading of a plugin module.
"""
format = '%(reason)s'
class PluginsPackageError(PrivateError):
"""
Raised when ``package.plugins`` is a module instead of a sub-package.
"""
format = '%(name)s must be sub-package, not module: %(file)r'
##############################################################################
# Public errors: