mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 08:35:21 +00:00
Strings and integers are not comparable under Python 3
This commit is contained in:
parent
60c94b77a9
commit
cf86cbf6d0
5
setup.py
5
setup.py
@ -203,6 +203,11 @@ def _check_ver(pyver, op, wanted):
|
||||
'''
|
||||
pyver = distutils.version.LooseVersion(pyver)
|
||||
wanted = distutils.version.LooseVersion(wanted)
|
||||
if IS_PY3:
|
||||
if not isinstance(pyver, str):
|
||||
pyver = str(pyver)
|
||||
if not isinstance(wanted, str):
|
||||
wanted = str(wanted)
|
||||
return getattr(operator, '__{}__'.format(op))(pyver, wanted)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user