Fix cp_list() to prevent it from returning a reference
authorZac Medico <zmedico@gentoo.org>
Sun, 28 Oct 2007 09:05:18 +0000 (09:05 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 28 Oct 2007 09:05:18 +0000 (09:05 -0000)
to one of it's internal lists.

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

pym/portage/dbapi/virtual.py

index 52aca6880edc3a4c82459ee27977dfe1020b5bca..fe93562127168c00646899e0c3f1ab2aae29c9ae 100644 (file)
@@ -50,8 +50,8 @@ class fakedbapi(dbapi):
                        cpv_list = []
                self._cpv_sort_ascending(cpv_list)
                if not (not cpv_list and mycp.startswith("virtual/")):
-                       self._match_cache[mycp] = cpv_list[:]
-               return cpv_list
+                       self._match_cache[mycp] = cpv_list
+               return cpv_list[:]
 
        def cp_all(self):
                return list(self.cpdict)