summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-09-04 04:44:09 +0000
committerZac Medico <zmedico@gentoo.org>2006-09-04 04:44:09 +0000
commitc7aae28b0d90a03b78ea11f2cf22e1f909875bb5 (patch)
treeda2f92b1cf9a7ac63373359892721f198e5104eb
parent623eff2bff5d70dbec6e4fb328d64f904c8e6e66 (diff)
downloadportage-c7aae28b0d90a03b78ea11f2cf22e1f909875bb5.tar.gz
portage-c7aae28b0d90a03b78ea11f2cf22e1f909875bb5.tar.bz2
portage-c7aae28b0d90a03b78ea11f2cf22e1f909875bb5.zip
Don't call dict.keys() unnecessarily for the containment test in dblink.isowner().
svn path=/main/trunk/; revision=4396
-rw-r--r--pym/portage.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 92b579286..5c450d3e2 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -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