Add another sanity check in the owners cache.
authorZac Medico <zmedico@gentoo.org>
Tue, 10 Jun 2008 05:31:48 +0000 (05:31 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 10 Jun 2008 05:31:48 +0000 (05:31 -0000)
svn path=/main/trunk/; revision=10640

pym/portage/dbapi/vartree.py

index f57555483a8e871a55c388d08e65595bca43ff26..a624958c680ae3b2cc440682eff9fa89bad463cd 100644 (file)
@@ -919,7 +919,10 @@ class vardbapi(dbapi):
                        base_names = self._vardb._aux_cache["owners"]["base_names"]
 
                        # Take inventory of all cached package hashes.
-                       for hash_values in base_names.itervalues():
+                       for name, hash_values in base_names.items():
+                               if not isinstance(hash_values, dict):
+                                       del base_names[name]
+                                       continue
                                cached_hashes.update(hash_values)
 
                        # Create sets of valid package hashes and uncached packages.