From: Zac Medico Date: Fri, 18 Nov 2011 05:15:53 +0000 (-0800) Subject: config: tweak mapping implementation more X-Git-Tag: v2.2.0_alpha76~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fcb918d19bfd96dbafcacb67d54977aa9e471013;p=portage.git config: tweak mapping implementation more --- diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index b722a21a0..835cd2385 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -2094,8 +2094,10 @@ class config(object): return portage._pym_path for d in self.lookuplist: - if mykey in d: + try: return d[mykey] + except KeyError: + pass raise KeyError(mykey) @@ -2153,7 +2155,7 @@ class config(object): def iteritems(self): for k in self: - yield (k, self[k]) + yield (k, self._getitem(k)) def items(self): return list(self.iteritems())