From 052bdf5a83c127f79b8518c41f2f8728f7125362 Mon Sep 17 00:00:00 2001 From: Aaron Bentley Date: Mon, 21 Mar 2005 14:06:46 +0000 Subject: [PATCH] Clearer error message. --- becommands/set.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() -- 2.26.2