diff options
Diffstat (limited to 'pip/commands/help.py')
-rw-r--r-- | pip/commands/help.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/pip/commands/help.py b/pip/commands/help.py index b5b31e702..4d504c521 100644 --- a/pip/commands/help.py +++ b/pip/commands/help.py @@ -1,5 +1,7 @@ -from pip.basecommand import Command, command_dict, load_all_commands -from pip.exceptions import InstallationError +from pip.basecommand import (Command, command_dict, + load_all_commands, SUCCESS, + ERROR) +from pip.exceptions import CommandError from pip.baseparser import parser @@ -14,10 +16,10 @@ class HelpCommand(Command): ## FIXME: handle errors better here command = args[0] if command not in command_dict: - raise InstallationError('No command with the name: %s' % command) + raise CommandError('No command with the name: %s' % command) command = command_dict[command] command.parser.print_help() - return + return SUCCESS parser.print_help() print('\nCommands available:') commands = list(set(command_dict.values())) @@ -26,6 +28,6 @@ class HelpCommand(Command): if command.hidden: continue print(' %s: %s' % (command.name, command.summary)) - + return SUCCESS HelpCommand() |