From fcb918d19bfd96dbafcacb67d54977aa9e471013 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 17 Nov 2011 21:15:53 -0800 Subject: [PATCH] config: tweak mapping implementation more --- pym/portage/package/ebuild/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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()) -- 2.26.2