diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 9a0dd9108..a1fe27e08 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -304,9 +304,6 @@ def _auth_from_domains(le_client, config, domains, plugins): return lineage -class ConfiguratorError(TypeError): # pylint: disable=missing-docstring - pass - def set_configurator(previously, now): """Setting configurators multiple ways is okay, as long as they all agree""" if now is None: @@ -315,7 +312,7 @@ def set_configurator(previously, now): if previously: if previously != now: msg = "Too many flags setting configurators/installers/authenticators %s -> %s" - raise ConfiguratorError, msg % (`previously`, `now`) + raise errors.ConfiguratorError, msg % (`previously`, `now`) return now def diagnose_configurator_problem(cfg_type, requested): @@ -329,12 +326,12 @@ def diagnose_configurator_problem(cfg_type, requested): if requested: if requested not in plugins: msg = "The requested " + requested + " plugin does not appear to be installed" - raise ConfiguratorError, msg + raise errors.ConfiguratorError, msg else: msg = "The " + requested + " plugin is not working; there may be problems " msg += "with your existing configuration" - raise ConfiguratorError, msg - raise ConfiguratorError, cfg_type + " could not be determined or is not installed" + raise errors.ConfiguratorError, msg + raise errors.ConfiguratorError, cfg_type + " could not be determined or is not installed" @@ -387,7 +384,7 @@ def run(args, config, plugins): # pylint: disable=too-many-branches,too-many-lo """Obtain a certificate and install.""" try: installer, authenticator = choose_configurator_plugins(args, config, plugins, "run") - except ConfiguratorError, e: + except errors.ConfiguratorError, e: return e.message domains = _find_domains(args, installer) diff --git a/letsencrypt/errors.py b/letsencrypt/errors.py index ba0601d29..def8fc20d 100644 --- a/letsencrypt/errors.py +++ b/letsencrypt/errors.py @@ -24,6 +24,8 @@ class SubprocessError(Error): class CertStorageError(Error): """Generic `.CertStorage` error.""" +class ConfiguratorError(Error): + """A problem with plugin/configurator selection or setup""" # Auth Handler Errors class AuthorizationError(Error):