Don't call dict.keys() unnecessarily for the containment test in dblink.isowner().
authorZac Medico <zmedico@gentoo.org>
Mon, 4 Sep 2006 04:44:09 +0000 (04:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 4 Sep 2006 04:44:09 +0000 (04:44 -0000)
svn path=/main/trunk/; revision=4396

pym/portage.py

index 92b5792866d88a39f3488f811ab855fe11055adf..5c450d3e214e3fb034763474fd580b1e33a736fd 100644 (file)
@@ -5845,7 +5845,8 @@ class dblink:
                        os.path.join(destroot, filename.lstrip(os.path.sep)))
                if not os.path.exists(destfile):
                        return True
-               if self.getcontents() and filename in self.getcontents().keys():
+               pkgfiles = self.getcontents()
+               if pkgfiles and filename in pkgfiles:
                        return True
 
                return False