From: Mark Hymers Date: Fri, 29 Jul 2011 08:28:41 +0000 (+0100) Subject: Remove use of Dir::Queue::Unchecked in config file X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=622c488469a1a5cf62a980e8d6f6ed3c0896f5a4;p=dak.git Remove use of Dir::Queue::Unchecked in config file Signed-off-by: Mark Hymers --- diff --git a/dak/clean_queues.py b/dak/clean_queues.py index 31cf86f2..1123494b 100755 --- a/dak/clean_queues.py +++ b/dak/clean_queues.py @@ -38,6 +38,7 @@ import apt_pkg from daklib import utils from daklib import daklog from daklib.config import Config +from daklib.dbconn import get_policy_queue ################################################################################ @@ -79,8 +80,15 @@ def init (cnf): # Move to the directory to clean incoming = Options["Incoming"] if incoming == "": - incoming = cnf["Dir::Queue::Unchecked"] - os.chdir(incoming) + incoming_queue = get_policy_queue('unchecked') + if not incoming_queue: + utils.fubar("Cannot find 'unchecked' queue") + incoming = incoming_queue.path + + try: + os.chdir(incoming) + except OSError, e: + utils.fubar("Cannot chdir to %s" % incoming) # Remove a file to the morgue def remove (from_dir, f):