diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 822f231ef..2aedeea8f 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -351,7 +351,8 @@ def diagnose_configurator_problem(cfg_type, requested, plugins): msg = "The requested {0} plugin does not appear to be installed".format(requested) else: msg = ("The {0} plugin is not working; there may be problems with " - "your existing configuration").format(requested) + "your existing configuration.\nThe error was: {1}" + .format(requested, plugins[requested].problem)) elif cfg_type == "installer": if os.path.exists("/etc/debian_version"): # Debian... installers are at least possible diff --git a/letsencrypt/plugins/disco.py b/letsencrypt/plugins/disco.py index 5a41fda88..3f26206c7 100644 --- a/letsencrypt/plugins/disco.py +++ b/letsencrypt/plugins/disco.py @@ -120,6 +120,12 @@ class PluginEntryPoint(object): """Is plugin misconfigured?""" return isinstance(self._prepared, errors.MisconfigurationError) + @property + def problem(self): + """Return the Exception raised during plugin setup, or None if all is well""" + if isinstance(self._prepared, Exception): + return self._prepared + @property def available(self): """Is plugin available, i.e. prepared or misconfigured?"""