X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fmanage_build_queues.py;h=e9486adfcdbf87ea3313f95cecb39f096a577067;hb=f0bfd37e7286156598d79b53501ebe2000bb7924;hp=53f7ed70fbb5da9a4c58d119906d46894fffc06d;hpb=18fde1b54154a63f5e8ec446d023c46634a86cc7;p=dak.git diff --git a/dak/manage_build_queues.py b/dak/manage_build_queues.py index 53f7ed70..e9486adf 100755 --- a/dak/manage_build_queues.py +++ b/dak/manage_build_queues.py @@ -1,8 +1,12 @@ #!/usr/bin/env python -"""Manage build queues""" -# Copyright (C) 2000, 2001, 2002, 2006 James Troup -# Copyright (C) 2009 Mark Hymers +""" Manage build queues + +@contact: Debian FTPMaster +@copyright: 2000, 2001, 2002, 2006 James Troup +@copyright: 2009 Mark Hymers + +""" # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,7 +24,10 @@ ################################################################################ -import os, os.path, stat, sys +import os +import os.path +import stat +import sys from datetime import datetime import apt_pkg @@ -41,7 +48,6 @@ Manage the contents of one or more build queues -a, --all run on all known build queues -n, --no-action don't do anything - -v, --verbose explain what is being done -h, --help show this help and exit""" sys.exit(exit_code) @@ -53,14 +59,13 @@ def main (): cnf = Config() - for i in ["Help", "No-Action", "Verbose", "All"]: + for i in ["Help", "No-Action", "All"]: if not cnf.has_key("Manage-Build-Queues::Options::%s" % (i)): cnf["Manage-Build-Queues::Options::%s" % (i)] = "" Arguments = [('h',"help","Manage-Build-Queues::Options::Help"), ('n',"no-action","Manage-Build-Queues::Options::No-Action"), - ('a',"all","Manage-Build-Queues::Options::All"), - ('v',"verbose","Manage-Build-Queues::Options::Verbose")] + ('a',"all","Manage-Build-Queues::Options::All")] queue_names = apt_pkg.ParseCommandLine(cnf.Cnf, Arguments, sys.argv) Options = cnf.SubTree("Manage-Build-Queues::Options") @@ -92,7 +97,7 @@ def main (): # For each given queue, look up object and call manage_queue for q in queues: Logger.log(['cleaning queue %s using datetime %s' % (q.queue_name, starttime)]) - q.clean_and_update(starttime, dryrun=Options["No-Action"]) + q.clean_and_update(starttime, Logger, dryrun=Options["No-Action"]) Logger.close()