summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-21 01:54:42 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-21 01:54:42 +0000
commitbdb9600295662f022e3b2c147abad3c945c517f6 (patch)
treeb2a368414ad53ff3034c93e3d0412a2962d2504b
parent4a177ec5a8f7281d73a92c48f575fc432f2d6628 (diff)
downloadportage-bdb9600295662f022e3b2c147abad3c945c517f6.tar.gz
portage-bdb9600295662f022e3b2c147abad3c945c517f6.tar.bz2
portage-bdb9600295662f022e3b2c147abad3c945c517f6.zip
For bug #158632, make aux_get caching safe for missing values in cache entries.
svn path=/main/trunk/; revision=5342
-rw-r--r--pym/portage.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 40cb23246..22479c1f9 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -5422,10 +5422,11 @@ class portdbapi(dbapi):
if cache_me:
aux_cache = {}
+ mydata.setdefault("EAPI", "0")
+ if not mydata["EAPI"]:
+ mydata["EAPI"] = "0"
for x in self._aux_cache_keys:
- aux_cache[x] = mydata[x]
- if not aux_cache["EAPI"]:
- aux_cache["EAPI"] = "0"
+ aux_cache[x] = mydata.get(x, "")
self._aux_cache[mycpv] = aux_cache
return returnme