]> err.no Git - dak/commitdiff
Use database instead of config file
authorMark Hymers <mhy@debian.org>
Fri, 29 Jul 2011 11:39:03 +0000 (12:39 +0100)
committerMark Hymers <mhy@debian.org>
Fri, 29 Jul 2011 11:39:03 +0000 (12:39 +0100)
Signed-off-by: Mark Hymers <mhy@debian.org>
daklib/queue.py

index f5f3c65c9e5729c65663072bb578eb3a98a8abcc..c4938df1e0b59bb19f237e1abf0d49caf1ba11ee 100755 (executable)
@@ -1502,16 +1502,16 @@ class Upload(object):
                 continue
 
             # Look in some other queues for the file
-            queues = ('New', 'Byhand', 'ProposedUpdates',
-                'OldProposedUpdates', 'Embargoed', 'Unembargoed')
+            queue_names = ['new', 'byhand',
+                           'proposedupdates', 'oldproposedupdates',
+                           'embargoed', 'unembargoed']
 
-            for queue in queues:
-                if not cnf.get('Dir::Queue::%s' % queue):
+            for queue_name in queue_names:
+                queue = get_policy_queue(queue_name, session)
+                if not queue:
                     continue
 
-                queuefile_path = os.path.join(
-                    cnf['Dir::Queue::%s' % queue], filename
-                )
+                queuefile_path = os.path.join(queue.path, filename)
 
                 if not os.path.exists(queuefile_path):
                     # Does not exist in this queue