Handle CacheCorruption from self.db_ro in _setitem, triggered by INHERITED
authorZac Medico <zmedico@gentoo.org>
Sat, 20 Feb 2010 21:10:47 +0000 (21:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 20 Feb 2010 21:10:47 +0000 (21:10 -0000)
containing non-existent eclass inside metadata.database._parse_data. Thanks
to Vlastimil Babka <caster@g.o> for reporting.

svn path=/main/trunk/; revision=15412

pym/portage/cache/metadata_overlay.py

index 84c5a9741ef5c6bea7009636a734567b827b1d5f..7b4f70a9cae986e9d569969a1a17b871c8d970b4 100644 (file)
@@ -48,7 +48,10 @@ class database(template.database):
                        return value
 
        def _setitem(self, name, values):
-               value_ro = self.db_ro.get(name, None)
+               try:
+                       value_ro = self.db_ro.get(name)
+               except CacheCorruption:
+                       value_ro = None
                if value_ro is not None and \
                        self._are_values_identical(value_ro, values):
                        # we have matching values in the underlying db_ro