diff options
Diffstat (limited to 'pip/commands/search.py')
-rw-r--r-- | pip/commands/search.py | 10 |
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) |