diff --git a/lib/importer.py b/lib/importer.py index 67eb34d..34c5f10 100644 --- a/lib/importer.py +++ b/lib/importer.py @@ -160,26 +160,26 @@ class Importer: (lproject, lpackage) = row self.update_db_package(db, lproject, lpackage) - missing_users = User.missing_users(db) - for userid in missing_users: - missing_user = self.obs.user(userid) - if missing_user: - missing_user.import_into_db(db) + missing_users = User.missing_users(db) + for userid in missing_users: + missing_user = self.obs.user(userid) + if missing_user: + missing_user.import_into_db(db) - for rev in DBRevision.all_revisions(db, project, self.package): - # TODO move into SELECT - if rev.broken or rev.expanded_srcmd5: - continue - linked_rev = rev.linked_rev(db) - if linked_rev: - linked_rev = linked_rev.unexpanded_srcmd5 - list = self.obs.list( - project, self.package, rev.unexpanded_srcmd5, linked_rev - ) - if list: - rev.import_dir_list(db, list) - else: - rev.set_broken(db) + for rev in DBRevision.all_revisions(db, project, self.package): + # TODO move into SELECT + if rev.broken or rev.expanded_srcmd5: + continue + linked_rev = rev.linked_rev(db) + if linked_rev: + linked_rev = linked_rev.unexpanded_srcmd5 + list = self.obs.list( + project, self.package, rev.unexpanded_srcmd5, linked_rev + ) + if list: + rev.import_dir_list(db, list) + else: + rev.set_broken(db) for number in DBRevision.requests_to_fetch(db, project, self.package): self.obs.request(number).import_into_db(db)