mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-19 12:51:29 +00:00
buildd: Create a base to add code for the new v2 mode
This commit is contained in:
parent
cdb1292963
commit
4f97f5ba15
16
buildd
16
buildd
@ -6,6 +6,7 @@
|
|||||||
# Authors:
|
# Authors:
|
||||||
# - Martin Pitt <martin.pitt@canonical.com>
|
# - Martin Pitt <martin.pitt@canonical.com>
|
||||||
# - Jonathan Davies <jpds@ubuntu.com>
|
# - Jonathan Davies <jpds@ubuntu.com>
|
||||||
|
# - Michael Bienia <geser@ubuntu.com>
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -73,15 +74,11 @@ optParser.add_option_group(v2options)
|
|||||||
# Parse our options.
|
# Parse our options.
|
||||||
(options, args) = optParser.parse_args()
|
(options, args) = optParser.parse_args()
|
||||||
|
|
||||||
# 'help' called by itself - show our help.
|
if not len(args):
|
||||||
try:
|
|
||||||
if args[0].lower() in ("help") and len(args) == 1:
|
|
||||||
optParser.print_help()
|
optParser.print_help()
|
||||||
sys.exit(0)
|
sys.exit(1)
|
||||||
except IndexError:
|
|
||||||
optParser.print_help()
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
|
if not options.v2mode:
|
||||||
# Check we have the correct number of arguments.
|
# Check we have the correct number of arguments.
|
||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
optParser.error("Incorrect number of arguments.")
|
optParser.error("Incorrect number of arguments.")
|
||||||
@ -92,7 +89,7 @@ try:
|
|||||||
op = str(args[2]).lower()
|
op = str(args[2]).lower()
|
||||||
except IndexError:
|
except IndexError:
|
||||||
optParser.print_help()
|
optParser.print_help()
|
||||||
sys.exit(0)
|
sys.exit(1)
|
||||||
|
|
||||||
# Check our operation.
|
# Check our operation.
|
||||||
if op not in ("rescore", "retry", "status"):
|
if op not in ("rescore", "retry", "status"):
|
||||||
@ -185,3 +182,6 @@ if done: sys.exit(0)
|
|||||||
print "No builds for '%s' found in the %s release - it may have been " \
|
print "No builds for '%s' found in the %s release - it may have been " \
|
||||||
"built in a former release." % (package, release.capitalize())
|
"built in a former release." % (package, release.capitalize())
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
# V2 mode
|
||||||
|
sys.exit(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user