Friendlier error message on "close" with no arguments.
authorMarien Zwart <marienz@gentoo.org>
Wed, 5 Apr 2006 21:05:27 +0000 (23:05 +0200)
committerMarien Zwart <marienz@gentoo.org>
Wed, 5 Apr 2006 21:05:27 +0000 (23:05 +0200)
becommands/close.py

index 7e5ac1c0df7748183e62d62056097095bd1d6b92..52ab735fb69df11447f585726dc6b80ffb8fa296 100644 (file)
@@ -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()