Merge pull request #33396 from babilen/issue-33393

Issue 33393
This commit is contained in:
Mike Place 2016-06-01 14:12:03 -07:00
commit 13537c4891

View file

@ -49,22 +49,13 @@ if HAS_PIP is True:
if 'pip' in sys.modules:
del sys.modules['pip']
ver = pip.__version__.split('.')
pip_ver = tuple([int(x) for x in ver if x.isdigit()])
if pip_ver >= (8, 0, 0):
try:
from pip.exceptions import InstallationError
else:
except ImportError:
InstallationError = ValueError
# pylint: enable=import-error
ver = pip.__version__.split('.')
pip_ver = tuple([int(x) for x in ver if x.isdigit()])
if pip_ver >= (8, 0, 0):
from pip.exceptions import InstallationError
else:
InstallationError = ValueError
logger = logging.getLogger(__name__)
# Define the module's virtual name