diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-09-22 22:30:49 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-09-22 22:30:49 +0000 |
commit | cc9856b20d6d2188b4a54c419efc68f2aa627fa6 (patch) | |
tree | 5014ca9b0527907e9c65abfaf53a72fbf14e35dc | |
parent | 3b2a33efdb6690385db6fda0353d6424e591793d (diff) | |
download | portage-cc9856b20d6d2188b4a54c419efc68f2aa627fa6.tar.gz portage-cc9856b20d6d2188b4a54c419efc68f2aa627fa6.tar.bz2 portage-cc9856b20d6d2188b4a54c419efc68f2aa627fa6.zip |
Optimize SlotDict.iteritems() a little.
svn path=/main/trunk/; revision=14391
-rw-r--r-- | pym/portage/cache/mappings.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/cache/mappings.py b/pym/portage/cache/mappings.py index 38a3bfe34..bd9f082b9 100644 --- a/pym/portage/cache/mappings.py +++ b/pym/portage/cache/mappings.py @@ -346,9 +346,10 @@ def slot_dict_class(keys, prefix="_val_"): return list(self) def iteritems(self): + prefix = self._prefix for k in self.allowed_keys: try: - yield (k, getattr(self, self._prefix + k)) + yield (k, getattr(self, prefix + k)) except AttributeError: pass |