From: Zac Medico Date: Thu, 21 Dec 2006 02:45:02 +0000 (-0000) Subject: Use the return value from setdefault to avoid an extra dict lookup. X-Git-Tag: v2.1.2~252 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0c6496355ef118ba8beb88b24e6e046289584760;p=portage.git Use the return value from setdefault to avoid an extra dict lookup. svn path=/main/trunk/; revision=5344 --- 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, "")