[bin/cdist] Fix Python version check
This commit is contained in:
parent
9ec01d9f97
commit
1c047353a9
2 changed files with 6 additions and 4 deletions
|
@ -72,9 +72,11 @@ def commandline():
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if sys.version < cdist.MIN_SUPPORTED_PYTHON_VERSION:
|
||||
print('Python >= {} is required on the source host.'.format(
|
||||
cdist.MIN_SUPPORTED_PYTHON_VERSIO), file=sys.stderr)
|
||||
if sys.version_info[:3] < cdist.MIN_SUPPORTED_PYTHON_VERSION:
|
||||
print(
|
||||
'Python >= {} is required on the source host.'.format(
|
||||
".".join(map(str, cdist.MIN_SUPPORTED_PYTHON_VERSION))),
|
||||
file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
exit_code = 0
|
||||
|
|
|
@ -64,7 +64,7 @@ REMOTE_EXEC = "ssh -o User=root"
|
|||
REMOTE_CMDS_CLEANUP_PATTERN = "ssh -o User=root -O exit -S {}"
|
||||
|
||||
|
||||
MIN_SUPPORTED_PYTHON_VERSION = '3.5'
|
||||
MIN_SUPPORTED_PYTHON_VERSION = (3, 5)
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
|
|
Loading…
Reference in a new issue