diff --git a/letsencrypt/plugins/disco.py b/letsencrypt/plugins/disco.py index 8c4e1ad55..d70dfc751 100644 --- a/letsencrypt/plugins/disco.py +++ b/letsencrypt/plugins/disco.py @@ -215,8 +215,9 @@ class PluginsRegistry(collections.Mapping): return None def __repr__(self): - return "{0}({1!r})".format( - self.__class__.__name__, set(self._plugins.itervalues())) + return "{0}({1})".format( + self.__class__.__name__, ','.join( + repr(p_ep) for p_ep in self._plugins.itervalues())) def __str__(self): if not self._plugins: diff --git a/letsencrypt/plugins/disco_test.py b/letsencrypt/plugins/disco_test.py index f3cdd43c6..0dd65e5de 100644 --- a/letsencrypt/plugins/disco_test.py +++ b/letsencrypt/plugins/disco_test.py @@ -154,6 +154,7 @@ class PluginsRegistryTest(unittest.TestCase): def setUp(self): from letsencrypt.plugins.disco import PluginsRegistry self.plugin_ep = mock.MagicMock(name="mock") + self.plugin_ep.__hash__.side_effect = TypeError self.plugins = {"mock": self.plugin_ep} self.reg = PluginsRegistry(self.plugins) @@ -227,7 +228,7 @@ class PluginsRegistryTest(unittest.TestCase): def test_repr(self): self.plugin_ep.__repr__ = lambda _: "PluginEntryPoint#mock" - self.assertEqual("PluginsRegistry(set([PluginEntryPoint#mock]))", + self.assertEqual("PluginsRegistry(PluginEntryPoint#mock)", repr(self.reg)) def test_str(self):