Clearer error message.
authorAaron Bentley <abentley@panoramicfeedback.com>
Mon, 21 Mar 2005 14:06:46 +0000 (14:06 +0000)
committerAaron Bentley <abentley@panoramicfeedback.com>
Mon, 21 Mar 2005 14:06:46 +0000 (14:06 +0000)
becommands/set.py

index 547e4a932b5653da3238c33190367ec982ba8e1a..875ca86140ae91c5c5936b8d7e1d62adf89965db 100644 (file)
@@ -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()