From: Aaron Bentley Date: Mon, 21 Mar 2005 14:06:46 +0000 (+0000) Subject: Clearer error message. X-Git-Tag: 1.0.0~335 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=052bdf5a83c127f79b8518c41f2f8728f7125362;p=be.git Clearer error message. --- diff --git a/becommands/set.py b/becommands/set.py index 547e4a9..875ca86 100644 --- a/becommands/set.py +++ b/becommands/set.py @@ -1,7 +1,8 @@ """Change tree settings""" from libbe import cmdutil def execute(args): - assert len(args) in (0, 1, 2) + if len(args) > 2: + raise cmdutil.UserError("Too many arguments.") tree = cmdutil.bug_tree() if len(args) == 0: keys = tree.settings.keys()