1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Handle the case where pip isn't installed during the version check

This commit is contained in:
Donald Stufft 2015-08-22 17:50:22 -04:00
parent 3d245ea2d2
commit bee3be48ad

View file

@ -99,7 +99,11 @@ def pip_version_check(session):
the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix
of the pip script path.
"""
pip_version = packaging_version.parse(get_installed_version('pip'))
installed_version = get_installed_version("pip")
if installed_version is None:
return
pip_version = packaging_version.parse(installed_version)
pypi_version = None
try: