summaryrefslogtreecommitdiff
path: root/pip/commands/search.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/search.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/search.py')
-rw-r--r--pip/commands/search.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pip/commands/search.py b/pip/commands/search.py
index f1e6aafe1..0e72ab364 100644
--- a/pip/commands/search.py
+++ b/pip/commands/search.py
@@ -2,18 +2,15 @@ import sys
import textwrap
import pkg_resources
import pip.download
-from pip.basecommand import Command
+from pip.basecommand import Command, SUCCESS
from pip.util import get_terminal_size
from pip.log import logger
from pip.backwardcompat import xmlrpclib, reduce, cmp
from pip.exceptions import CommandError
+from pip.status_codes import NO_MATCHES_FOUND
from distutils.version import StrictVersion, LooseVersion
-class SearchCommandError(CommandError):
- pass
-
-
class SearchCommand(Command):
name = 'search'
usage = '%prog QUERY'
@@ -42,6 +39,9 @@ class SearchCommand(Command):
terminal_width = get_terminal_size()[0]
print_results(hits, terminal_width=terminal_width)
+ if pypi_hits:
+ return SUCCESS
+ return NO_MATCHES_FOUND
def search(self, query, index_url):
pypi = xmlrpclib.ServerProxy(index_url, pip.download.xmlrpclib_transport)