hooks/__init__.py
changeset 9448 3e7cad3967c5
parent 9263 42cc70a1b6ac
child 9450 af4b93bc38a5
--- a/hooks/__init__.py	Thu Jun 27 08:30:46 2013 +0200
+++ b/hooks/__init__.py	Tue Jan 21 18:11:30 2014 +0100
@@ -59,7 +59,7 @@
         def update_feeds(repo):
             # don't iter on repo.sources which doesn't include copy based
             # sources (the one we're looking for)
-            # take a list to avoid iterating on a dictionary which size may
+            # take a list to avoid iterating on a dictionary whose size may
             # change
             for source in list(repo.sources_by_eid.values()):
                 if (not source.copy_based_source
@@ -83,8 +83,8 @@
 
     def __call__(self):
         def expire_dataimports(repo=self.repo):
-            for source in repo.sources_by_eid.itervalues():
-                if (not source.copy_based_source
+            for uri, source in repo.sources_by_uri.iteritems():
+                if (uri == 'system'
                     or not repo.config.source_enabled(source)):
                     continue
                 session = repo.internal_session()