X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fclean_queues.py;h=88b0bb9334a712228e2b2ae27ca2cf53f5e016f1;hb=fdbef587c29814f97c192de5a8b7e9f09cc45fa4;hp=e6e4f76cb32b23b77da55885e8d9022d95e10bb6;hpb=6cc75beccd14c9b39621cb5894d67cec24750405;p=dak.git diff --git a/dak/clean_queues.py b/dak/clean_queues.py index e6e4f76c..88b0bb93 100755 --- a/dak/clean_queues.py +++ b/dak/clean_queues.py @@ -91,12 +91,11 @@ def init (cnf): utils.fubar("%s must be a directory." % (del_dir)) # Move to the directory to clean - incoming = Options["Incoming"] - if incoming == "": - incoming_queue = get_policy_queue('unchecked') - if not incoming_queue: - utils.fubar("Cannot find 'unchecked' queue") - incoming = incoming_queue.path + incoming = Options.get("Incoming") + if not incoming: + incoming = cnf.get('Dir::Unchecked') + if not incoming: + utils.fubar("Cannot find 'unchecked' directory") try: os.chdir(incoming) @@ -208,8 +207,8 @@ def main (): ('n',"no-action","Clean-Queues::Options::No-Action"), ('v',"verbose","Clean-Queues::Options::Verbose")] - apt_pkg.ParseCommandLine(cnf.Cnf,Arguments,sys.argv) - Options = cnf.SubTree("Clean-Queues::Options") + apt_pkg.parse_commandline(cnf.Cnf,Arguments,sys.argv) + Options = cnf.subtree("Clean-Queues::Options") if Options["Help"]: usage()