pull/936/head
Louis Vézina 5 years ago
parent 1f25fdde2f
commit b2d8d49495

@ -1,7 +1,7 @@
# coding=utf-8 # coding=utf-8
import bazarr.libs
import os import os
import platform
import signal import signal
import subprocess import subprocess
import sys import sys
@ -15,14 +15,13 @@ def check_python_version():
minimum_py3_tuple = (3, 7, 0) minimum_py3_tuple = (3, 7, 0)
minimum_py3_str = ".".join(str(i) for i in minimum_py3_tuple) minimum_py3_str = ".".join(str(i) for i in minimum_py3_tuple)
if int(python_version[0]) < 3: if int(python_version[0]) < minimum_py3_tuple[0]:
print("Python " + minimum_py3_str + " or greater required. " print("Python " + minimum_py3_str + " or greater required. Current version is " + platform.python_version() +
"Current version is " + platform.python_version() + ". Please upgrade Python.") ". Please upgrade Python.")
sys.exit(1) sys.exit(1)
elif (int(python_version[0]) == minimum_py3_tuple[0] and int(python_version[1]) < minimum_py3_tuple[1]) or \ elif int(python_version[1]) < minimum_py3_tuple[1]:
(int(python_version[0]) != minimum_py3_tuple[0] and int(python_version[0]) != minimum_py2_tuple[0]): print("Python " + minimum_py3_str + " or greater required. Current version is " + platform.python_version() +
print("Python " + minimum_py3_str + " or greater required. " ". Please upgrade Python.")
"Current version is " + platform.python_version() + ". Please upgrade Python.")
sys.exit(1) sys.exit(1)

Loading…
Cancel
Save