diff options
-rw-r--r-- | libbe/command/close.py | 4 | ||||
-rw-r--r-- | libbe/command/depend.py | 6 | ||||
-rw-r--r-- | libbe/command/open.py | 4 | ||||
-rw-r--r-- | libbe/command/show.py | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/libbe/command/close.py b/libbe/command/close.py index 7cb51b1..f470950 100644 --- a/libbe/command/close.py +++ b/libbe/command/close.py @@ -41,9 +41,9 @@ def execute(args, manipulate_encodings=True): cmdutil.default_complete(options, args, parser, bugid_args={0: lambda bug : bug.active==True}) if len(args) == 0: - raise cmdutil.UsageError("Please specify a bug id.") + raise cmdutil.UserError("Please specify a bug id.") if len(args) > 1: - raise cmdutil.UsageError("Too many arguments.") + raise cmdutil.UserError("Too many arguments.") bd = bugdir.BugDir(from_disk=True, manipulate_encodings=manipulate_encodings) bug = cmdutil.bug_from_shortname(bd, args[0]) diff --git a/libbe/command/depend.py b/libbe/command/depend.py index e32d55e..92140eb 100644 --- a/libbe/command/depend.py +++ b/libbe/command/depend.py @@ -119,14 +119,14 @@ class Depend (libbe.command.Command): def _run(self, **params): if params['repair'] == True and params['bug-id'] != None: - raise libbe.command.UsageError( + raise libbe.command.UserError( 'No arguments with --repair calls.') if params['repair'] == False and params['bug-id'] == None: - raise libbe.command.UsageError( + raise libbe.command.UserError( 'Must specify either --repair or a BUG-ID') if params['tree-depth'] != None \ and params['blocking-bug-id'] != None: - raise libbe.command.UsageError( + raise libbe.command.UserError( 'Only one bug id used in tree mode.') bugdir = self._get_bugdir() if params['repair'] == True: diff --git a/libbe/command/open.py b/libbe/command/open.py index b409965..1551962 100644 --- a/libbe/command/open.py +++ b/libbe/command/open.py @@ -40,9 +40,9 @@ def execute(args, manipulate_encodings=True): cmdutil.default_complete(options, args, parser, bugid_args={0: lambda bug : bug.active==False}) if len(args) == 0: - raise cmdutil.UsageError, "Please specify a bug id." + raise cmdutil.UserError, "Please specify a bug id." if len(args) > 1: - raise cmdutil.UsageError, "Too many arguments." + raise cmdutil.UserError, "Too many arguments." bd = bugdir.BugDir(from_disk=True, manipulate_encodings=manipulate_encodings) bug = cmdutil.bug_from_shortname(bd, args[0]) diff --git a/libbe/command/show.py b/libbe/command/show.py index b267381..c6ad37d 100644 --- a/libbe/command/show.py +++ b/libbe/command/show.py @@ -101,12 +101,12 @@ class Show (libbe.command.Command): bugdir = self._get_bugdir() if params['only-raw-body'] == True: if len(params['id']) != 1: - raise libbe.command.UsageError( + raise libbe.command.UserError( 'only one ID accepted with --only-raw-body') bug,comment = libbe.command.util.bug_comment_from_user_id( bugdir, params['id'][0]) if comment == bug.comment_root: - raise libbe.command.UsageError( + raise libbe.command.UserError( "--only-raw-body requires a comment ID, not '%s'" % params['id'][0]) sys.__stdout__.write(comment.body) |