summaryrefslogtreecommitdiff
path: root/pip/commands/help.py
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2012-01-07 17:34:15 +0100
committerJannis Leidel <jannis@leidel.info>2012-01-07 17:34:15 +0100
commitefa479c50249b00493807a325f2713c592306fcb (patch)
tree5a8d417baf48943b9bff309ea030b62d3a4c27b4 /pip/commands/help.py
parent550f6705d5b53d5b526f97b163a2e8a28966d7fe (diff)
parent6d6ead7923b80271243dc59225b5a29b87f28306 (diff)
downloadpip-feature/pep381-verification.tar.gz
Merge branch 'develop' into feature/pep381-verificationfeature/pep381-verification
Conflicts: pip/basecommand.py pip/download.py
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()