aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/close.py
diff options
context:
space:
mode:
authorMarien Zwart <marienz@gentoo.org>2006-04-05 23:05:27 +0200
committerMarien Zwart <marienz@gentoo.org>2006-04-05 23:05:27 +0200
commit06c627a8532f5c4531483ffcbeba5ddf724d5685 (patch)
treef725d58ce6e46ac6ee350ccf8cd6ba9a5395f13c /becommands/close.py
parent28dd7abe5900cf3f16e62f3641fd62040764fad8 (diff)
downloadbugseverywhere-06c627a8532f5c4531483ffcbeba5ddf724d5685.tar.gz
Friendlier error message on "close" with no arguments.
Diffstat (limited to 'becommands/close.py')
-rw-r--r--becommands/close.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/becommands/close.py b/becommands/close.py
index 7e5ac1c..52ab735 100644
--- a/becommands/close.py
+++ b/becommands/close.py
@@ -30,7 +30,8 @@ def execute(args):
>>> tests.clean_up()
"""
options, args = get_parser().parse_args(args)
- assert(len(args) == 1)
+ if len(args) !=1:
+ raise cmdutil.UserError("Please specify a bug id.")
bug = cmdutil.get_bug(args[0])
bug.status = "closed"
bug.save()