mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Strings and integers are not comparable under Python 3
This commit is contained in:
parent
d308dce3f5
commit
9fef3859cf
1 changed files with 5 additions and 0 deletions
5
setup.py
5
setup.py
|
@ -204,6 +204,11 @@ def _check_ver(pyver, op, wanted):
|
||||||
'''
|
'''
|
||||||
pyver = distutils.version.LooseVersion(pyver)
|
pyver = distutils.version.LooseVersion(pyver)
|
||||||
wanted = distutils.version.LooseVersion(wanted)
|
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)
|
return getattr(operator, '__{}__'.format(op))(pyver, wanted)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue