mirror of https://github.com/pypa/pip
Move status codes to a module and import from there
This commit is contained in:
parent
0ece434f81
commit
615e724de2
|
@ -13,6 +13,8 @@ from pip.download import urlopen
|
|||
from pip.exceptions import (BadCommand, InstallationError, UninstallationError,
|
||||
CommandError)
|
||||
from pip.backwardcompat import StringIO, walk_packages
|
||||
from pip.status_codes import SUCCESS, ERROR, UNKNOWN_ERROR, VIRTUALENV_NOT_FOUND
|
||||
|
||||
|
||||
__all__ = ['command_dict', 'Command', 'load_all_commands',
|
||||
'load_command', 'command_names']
|
||||
|
@ -22,11 +24,6 @@ command_dict = {}
|
|||
# for backwards compatibiliy
|
||||
get_proxy = urlopen.get_proxy
|
||||
|
||||
SUCCESS = 0
|
||||
ERROR = 1
|
||||
UNKNOWN_ERROR = 2
|
||||
VIRTUALENV_NOT_FOUND = 3
|
||||
|
||||
class Command(object):
|
||||
name = None
|
||||
usage = None
|
||||
|
|
|
@ -7,12 +7,10 @@ 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
|
||||
|
||||
|
||||
NO_MATCHES_FOUND = 23
|
||||
|
||||
|
||||
class SearchCommand(Command):
|
||||
name = 'search'
|
||||
usage = '%prog QUERY'
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
SUCCESS = 0
|
||||
ERROR = 1
|
||||
UNKNOWN_ERROR = 2
|
||||
VIRTUALENV_NOT_FOUND = 3
|
||||
NO_MATCHES_FOUND = 23
|
Loading…
Reference in New Issue