From: Mark Hymers Date: Fri, 29 Jul 2011 11:39:03 +0000 (+0100) Subject: Use database instead of config file X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b51c7b614ec7ffcb4f758a738e7e684eae3dd7f4;p=dak Use database instead of config file Signed-off-by: Mark Hymers --- diff --git a/daklib/queue.py b/daklib/queue.py index f5f3c65c..c4938df1 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -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