diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index ed452b5e6..3b16d0b6a 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -351,8 +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.\nThe error was: {1}" - .format(requested, `plugins[requested].problem`)) + "your existing configuration.\nThe error was: {1!r}" + .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 3f26206c7..9ed6ac596 100644 --- a/letsencrypt/plugins/disco.py +++ b/letsencrypt/plugins/disco.py @@ -125,6 +125,7 @@ class PluginEntryPoint(object): """Return the Exception raised during plugin setup, or None if all is well""" if isinstance(self._prepared, Exception): return self._prepared + return None @property def available(self): diff --git a/letsencrypt/plugins/disco_test.py b/letsencrypt/plugins/disco_test.py index 8660d94a1..88c7a671f 100644 --- a/letsencrypt/plugins/disco_test.py +++ b/letsencrypt/plugins/disco_test.py @@ -68,6 +68,7 @@ class PluginEntryPointTest(unittest.TestCase): self.assertFalse(self.plugin_ep.prepared) self.assertFalse(self.plugin_ep.misconfigured) self.assertFalse(self.plugin_ep.available) + self.assertTrue(self.plugin_ep.problem is None) self.assertTrue(self.plugin_ep.entry_point is EP_SA) self.assertEqual("sa", self.plugin_ep.name) @@ -131,6 +132,8 @@ class PluginEntryPointTest(unittest.TestCase): errors.MisconfigurationError)) self.assertTrue(self.plugin_ep.prepared) self.assertTrue(self.plugin_ep.misconfigured) + self.assertTrue(isinstance(self.plugin_ep.problem, + errors.MisconfigurationError)) self.assertTrue(self.plugin_ep.available) def test_prepare_no_installation(self):