Fix 'RuntimeError: dictionary changed size during iteration' in
authorZac Medico <zmedico@gentoo.org>
Mon, 21 Sep 2009 22:26:56 +0000 (22:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 21 Sep 2009 22:26:56 +0000 (22:26 -0000)
_owners_db._populate() with py3k.

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

pym/portage/dbapi/vartree.py

index 12dd15f1b008ea8dd8f5e677a77d060189cac470..8d0256c126a00f49820858bb57bcdb86bba7e052 100644 (file)
@@ -1538,7 +1538,7 @@ class vardbapi(dbapi):
                        # Delete any stale cache.
                        stale_hashes = cached_hashes.difference(valid_pkg_hashes)
                        if stale_hashes:
-                               for base_name_hash, bucket in base_names.items():
+                               for base_name_hash, bucket in list(base_names.items()):
                                        for hash_value in stale_hashes.intersection(bucket):
                                                del bucket[hash_value]
                                        if not bucket: