From 0c6496355ef118ba8beb88b24e6e046289584760 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 21 Dec 2006 02:45:02 +0000 Subject: [PATCH] Use the return value from setdefault to avoid an extra dict lookup. svn path=/main/trunk/; revision=5344 --- pym/portage.py | 3 +-- 1 file changed, 1 insertion(+), 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, "") -- 2.26.2