Convert version to int, instead of comparing strings to ints

This commit is contained in:
justinta89 2016-01-20 12:00:50 -07:00
parent 20384a4810
commit 6227368830

View file

@ -47,7 +47,8 @@ if HAS_PIP is True:
if 'pip' in sys.modules:
del sys.modules['pip']
pip_ver = tuple(pip.__version__.split('.'))
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: