1
1
Fork 0
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:
Jannis Leidel 2009-10-19 03:06:23 +02:00
parent d92e4f09db
commit 440f910222

18
pip.py
View file

@ -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']