From: Zac Medico Date: Tue, 3 Jul 2007 06:23:22 +0000 (-0000) Subject: Implement BlockerCache.keys() so that DictMixin.__repr__() works. X-Git-Tag: v2.2_pre1~1093 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eb99f07797c11156c032372a122cb7b73d8b23c1;p=portage.git Implement BlockerCache.keys() so that DictMixin.__repr__() works. svn path=/main/trunk/; revision=7135 --- diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 28d36919c..ec7c1ec9a 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -960,6 +960,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