mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Convert version to int, instead of comparing strings to ints
This commit is contained in:
parent
20384a4810
commit
6227368830
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue