From b51c7b614ec7ffcb4f758a738e7e684eae3dd7f4 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Fri, 29 Jul 2011 12:39:03 +0100 Subject: [PATCH] Use database instead of config file Signed-off-by: Mark Hymers --- daklib/queue.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 -- 2.39.5