hooks/__init__.py
changeset 9402 2c48c091b6a2
parent 9263 42cc70a1b6ac
child 9448 3e7cad3967c5
--- a/hooks/__init__.py	Tue Jul 02 17:09:04 2013 +0200
+++ b/hooks/__init__.py	Mon Jan 13 13:47:47 2014 +0100
@@ -59,7 +59,9 @@
         def update_feeds(repo):
             # don't iter on repo.sources which doesn't include copy based
             # sources (the one we're looking for)
-            for source in repo.sources_by_eid.itervalues():
+            # take a list to avoid iterating on a dictionary which size may
+            # change
+            for source in list(repo.sources_by_eid.values()):
                 if (not source.copy_based_source
                     or not repo.config.source_enabled(source)
                     or not source.config['synchronize']):