For sanity, pass an actual list of keys into aux_get() instead
authorZac Medico <zmedico@gentoo.org>
Sun, 4 Nov 2007 00:21:02 +0000 (00:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 4 Nov 2007 00:21:02 +0000 (00:21 -0000)
of iterating over a set that happens to be mutable (though it
remains constant in practice).

svn path=/main/trunk/; revision=8410

pym/portage/dbapi/porttree.py

index e6238700db17c6745b6186cd5bc039a4ab21a8b9..ea51f5d7e948dba9eb53b99d5436c86ce70b6902 100644 (file)
@@ -604,14 +604,15 @@ class portdbapi(dbapi):
                        myval = ""
                        settings = self.mysettings
                        local_config = settings.local_config
+                       aux_keys = list(self._aux_cache_keys)
                        if level == "minimum-visible":
                                iterfunc = iter
                        else:
                                iterfunc = reversed
                        for cpv in iterfunc(mylist):
                                try:
-                                       metadata = dict(izip(self._aux_cache_keys,
-                                               self.aux_get(cpv, self._aux_cache_keys)))
+                                       metadata = dict(izip(aux_keys,
+                                               self.aux_get(cpv, aux_keys)))
                                except KeyError:
                                        # ebuild masked by corruption
                                        continue
@@ -709,7 +710,7 @@ class portdbapi(dbapi):
                if mylist is None:
                        return []
                newlist=[]
-               aux_keys = self._aux_cache_keys
+               aux_keys = list(self._aux_cache_keys)
                metadata = {}
                local_config = self.mysettings.local_config
                for mycpv in mylist: