X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fcontrol_suite.py;h=8dc570222842c5162e98fbdd7ec31d9900f8dce8;hb=d2b763089f47e2f460b80971a3771dba808b4d60;hp=63a0386b1ed0f26f14cc5033c2055defdee09e57;hpb=1408d82381556c9e2b3eaa04412846c766a011db;p=dak.git diff --git a/dak/control_suite.py b/dak/control_suite.py old mode 100644 new mode 100755 index 63a0386b..8dc57022 --- a/dak/control_suite.py +++ b/dak/control_suite.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Manipulate suite tags +""" Manipulate suite tags """ # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 James Troup # This program is free software; you can redistribute it and/or modify @@ -43,9 +43,9 @@ import pg, sys import apt_pkg -import daklib.database as database -import daklib.logging as logging -import daklib.utils as utils +from daklib import database +from daklib import daklog +from daklib import utils ####################################################################################### @@ -244,7 +244,11 @@ def main (): if not Cnf.has_key("Control-Suite::Options::%s" % (i)): Cnf["Control-Suite::Options::%s" % (i)] = "" - file_list = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv) + try: + file_list = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); + except SystemError, e: + print "%s\n" % e + usage(1) Options = Cnf.SubTree("Control-Suite::Options") if Options["Help"]: @@ -272,12 +276,12 @@ def main (): # Safety/Sanity check if action == "set" and suite not in ["testing", "etch-m68k"]: - utils.fubar("Will not reset a suite other than testing.") + utils.fubar("Will not reset suite %s" % (suite)) if action == "list": get_list(suite) else: - Logger = logging.Logger(Cnf, "control-suite") + Logger = daklog.Logger(Cnf, "control-suite") if file_list: for f in file_list: process_file(utils.open_file(f), suite, action)