mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-10 16:31:28 +00:00
buildd: display help message if no parameters are passed.
This commit is contained in:
parent
21de3bb377
commit
a53cac66cd
16
buildd
16
buildd
@ -64,7 +64,11 @@ optParser.add_option_group(retryRescoreOptions)
|
|||||||
(options, args) = optParser.parse_args()
|
(options, args) = optParser.parse_args()
|
||||||
|
|
||||||
# 'help' called by itself - show our help.
|
# 'help' called by itself - show our help.
|
||||||
if args[0].lower() in ("help") and len(args) == 1:
|
try:
|
||||||
|
if args[0].lower() in ("help") and len(args) == 1:
|
||||||
|
optParser.print_help()
|
||||||
|
sys.exit(0)
|
||||||
|
except IndexError:
|
||||||
optParser.print_help()
|
optParser.print_help()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
@ -72,9 +76,13 @@ if args[0].lower() in ("help") and len(args) == 1:
|
|||||||
if len(args) < 3:
|
if len(args) < 3:
|
||||||
optParser.error("Incorrect number of arguments.")
|
optParser.error("Incorrect number of arguments.")
|
||||||
|
|
||||||
package = str(args[0]).lower()
|
try:
|
||||||
release = str(args[1]).lower()
|
package = str(args[0]).lower()
|
||||||
op = str(args[2]).lower()
|
release = str(args[1]).lower()
|
||||||
|
op = str(args[2]).lower()
|
||||||
|
except:
|
||||||
|
optParser.print_help()
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
# Check our operation.
|
# Check our operation.
|
||||||
if op not in ("rescore", "retry", "status"):
|
if op not in ("rescore", "retry", "status"):
|
||||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -11,7 +11,11 @@ ubuntu-dev-tools (0.60) UNRELEASED; urgency=low
|
|||||||
* ubuntutools/lp/functions.py: Rename urlopener import as it conflicts with
|
* ubuntutools/lp/functions.py: Rename urlopener import as it conflicts with
|
||||||
a variable, causing an error.
|
a variable, causing an error.
|
||||||
|
|
||||||
-- Iain Lane <laney@ubuntu.com> Sun, 25 Jan 2009 01:07:28 +0000
|
[ Luca Falavigna ]
|
||||||
|
* pull-debian-source: do not fail if package name contains a hypen.
|
||||||
|
* buildd: display help message if no parameters are passed.
|
||||||
|
|
||||||
|
-- Luca Falavigna <dktrkranz@ubuntu.com> Sun, 25 Jan 2009 16:48:02 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.59) jaunty; urgency=low
|
ubuntu-dev-tools (0.59) jaunty; urgency=low
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user