Make sure that bindbapi makes EAPI correctly default to 0 in all possible cases.
authorZac Medico <zmedico@gentoo.org>
Sun, 24 Dec 2006 23:49:25 +0000 (23:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 24 Dec 2006 23:49:25 +0000 (23:49 -0000)
svn path=/main/trunk/; revision=5384

pym/portage.py

index b5e7820d13e8fb82717695069fdce1895602fe91..98e899b126746fba4f5ccfb5b1b5458ff7abc236 100644 (file)
@@ -4655,9 +4655,9 @@ class bindbapi(fakedbapi):
                        # or the tbz2 is corrupt.
                        if myval:
                                mydata[x] = " ".join(myval.split())
-               eapi = mydata.get("EAPI")
-               if eapi is not None and not eapi:
-                       mydata["EAPI"] = "0"
+               if "EAPI" in mykeys:
+                       if not mydata.setdefault("EAPI", "0"):
+                               mydata["EAPI"] = "0"
                if cache_me:
                        aux_cache = {}
                        for x in self._aux_cache_keys: