Fix infinite recursion in items and values methods.
authorZac Medico <zmedico@gentoo.org>
Mon, 21 Sep 2009 16:23:20 +0000 (16:23 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 21 Sep 2009 16:23:20 +0000 (16:23 -0000)
svn path=/main/trunk/; revision=14328

pym/portage/cache/mappings.py

index 69e37fa153d38bbd0919415bf1757c56342fadb8..ed1b0426188c8430689b87f4d441998ba975ceb6 100644 (file)
@@ -52,10 +52,10 @@ class Mapping(object):
                        yield v
 
        def values(self):
-               return [v for _, v in self.items()]
+               return [v for _, v in self.iteritems()]
 
        def items(self):
-               return list(self.items())
+               return list(self.iteritems())
 
        def get(self, key, default=None):
                try:
@@ -353,14 +353,14 @@ def slot_dict_class(keys, prefix="_val_"):
                                                pass
 
                        def items(self):
-                               return list(self.items())
+                               return list(self.iteritems())
 
                        def itervalues(self):
                                for k, v in self.items():
                                        yield v
 
                        def values(self):
-                               return list(self.values())
+                               return list(self.itervalues())
 
                        def __delitem__(self, k):
                                try: