From c7aae28b0d90a03b78ea11f2cf22e1f909875bb5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 4 Sep 2006 04:44:09 +0000 Subject: [PATCH] Don't call dict.keys() unnecessarily for the containment test in dblink.isowner(). svn path=/main/trunk/; revision=4396 --- pym/portage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.26.2