Implement BlockerCache.keys() so that DictMixin.__repr__() works. (trunk r7135)
authorZac Medico <zmedico@gentoo.org>
Tue, 3 Jul 2007 06:24:38 +0000 (06:24 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 3 Jul 2007 06:24:38 +0000 (06:24 -0000)
svn path=/main/branches/2.1.2/; revision=7136

bin/emerge

index 58c53d4cd61c010d78106c4687e5784b05ed3488..99bfbb4d8e844e9d66a9d883efaab076dcef57b6 100755 (executable)
@@ -959,6 +959,13 @@ class BlockerCache(DictMixin):
                """
                return self.BlockerData(*self._cache_data["blockers"][cpv])
 
+       def keys(self):
+               """This needs to be implemented so that self.__repr__() doesn't raise
+               an AttributeError."""
+               if self._cache_data and "blockers" in self._cache_data:
+                       return self._cache_data["blockers"].keys()
+               return []
+
 def show_invalid_depstring_notice(parent_node, depstring, error_msg):
 
        from formatter import AbstractFormatter, DumbWriter