summaryrefslogtreecommitdiff
path: root/pip/commands/help.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2012-02-16 21:09:00 +0100
committerJannis Leidel <jannis@leidel.info>2012-02-16 21:09:00 +0100
commitee554dd82b8bc6ed9a3cf989b353126580fcc082 (patch)
treeb0604f39ed465673316fe94ffa29046ed868aafc /pip/commands/help.py
parent47f1b2c2b2523469e6107cb2ef325eb61fa8fcf1 (diff)
parent40ac381fad2cc31f75014f02d3e8bf755d933abb (diff)
downloadpip-1.1.tar.gz
Merge branch 'release/1.1'1.1
Diffstat (limited to 'pip/commands/help.py')
-rw-r--r--pip/commands/help.py12
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()