]> err.no Git - dak/commitdiff
Remove use of ::Queue:: in the import_known_changes
authorMark Hymers <mhy@debian.org>
Fri, 29 Jul 2011 09:29:52 +0000 (10:29 +0100)
committerMark Hymers <mhy@debian.org>
Fri, 29 Jul 2011 09:29:59 +0000 (10:29 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/import_known_changes.py

index b3f8e8a8359b2c7ac991862d174550e84222a3f7..5d666b6b6f4ef58b730cd3a33656cb829d9dd247 100755 (executable)
@@ -200,8 +200,18 @@ class ChangesGenerator(threading.Thread):
     def run(self):
         cnf = Config()
         count = 1
-        for directory in [ "Byhand", "Done", "New", "ProposedUpdates", "OldProposedUpdates" ]:
-            checkdir = cnf["Dir::Queue::%s" % (directory) ]
+
+        dirs = []
+        dirs.append(cnf['Dir::Done'])
+
+        for queue_name in [ "byhand", "new", "proposedupdates", "oldproposedupdates" ]:
+            queue = get_policy_queue(queue_name)
+            if queue:
+                dirs.append(os.path.abspath(queue.path))
+            else:
+                utils.warn("Could not find queue %s in database" % queue_name)
+
+        for checkdir in dirs
             if os.path.exists(checkdir):
                 print "Looking into %s" % (checkdir)