mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Move "any" block to top of file.
This commit is contained in:
parent
d92e4f09db
commit
440f910222
18
pip.py
18
pip.py
|
@ -48,6 +48,15 @@ class DistributionNotFound(InstallationError):
|
|||
class BadCommand(Exception):
|
||||
"""Raised when virtualenv or a command is not found"""
|
||||
|
||||
try:
|
||||
any
|
||||
except NameError:
|
||||
def any(seq):
|
||||
for item in seq:
|
||||
if item:
|
||||
return True
|
||||
return False
|
||||
|
||||
# FIXME doesn't account for venv linked to global site-packages
|
||||
if sys.platform == 'win32':
|
||||
lib_py = os.path.join(sys.prefix, 'Lib')
|
||||
|
@ -127,15 +136,6 @@ except pkg_resources.DistributionNotFound:
|
|||
# when running pip.py without installing
|
||||
version=None
|
||||
|
||||
try:
|
||||
any
|
||||
except NameError:
|
||||
def any(seq):
|
||||
for item in seq:
|
||||
if item:
|
||||
return True
|
||||
return False
|
||||
|
||||
class VcsSupport(object):
|
||||
_registry = {}
|
||||
schemes = ['ssh', 'git', 'hg', 'bzr', 'sftp']
|
||||
|
|
Loading…
Reference in a new issue