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)
('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()