summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-21 02:45:02 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-21 02:45:02 +0000
commit0c6496355ef118ba8beb88b24e6e046289584760 (patch)
tree7c6f5683b55d8b1dd7db13bc5e372c130af0a583
parent949c25399175bab695d96ae37c0f0dbb23637c69 (diff)
downloadportage-0c6496355ef118ba8beb88b24e6e046289584760.tar.gz
portage-0c6496355ef118ba8beb88b24e6e046289584760.tar.bz2
portage-0c6496355ef118ba8beb88b24e6e046289584760.zip
Use the return value from setdefault to avoid an extra dict lookup.
svn path=/main/trunk/; revision=5344
-rw-r--r--pym/portage.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 22479c1f9..5cceb6556 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5422,8 +5422,7 @@ class portdbapi(dbapi):
if cache_me:
aux_cache = {}
- mydata.setdefault("EAPI", "0")
- if not mydata["EAPI"]:
+ if not mydata.setdefault("EAPI", "0"):
mydata["EAPI"] = "0"
for x in self._aux_cache_keys:
aux_cache[x] = mydata.get(x, "")