From: Marien Zwart Date: Wed, 5 Apr 2006 21:05:27 +0000 (+0200) Subject: Friendlier error message on "close" with no arguments. X-Git-Tag: 1.0.0~198^2~1 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=06c627a8532f5c4531483ffcbeba5ddf724d5685;p=be.git Friendlier error message on "close" with no arguments. --- 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()