aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLouis Vézina <[email protected]>2020-04-12 08:50:25 -0400
committerLouis Vézina <[email protected]>2020-04-12 08:50:25 -0400
commit2bcb5a6030da2e55a24231311c056ecc40d14c32 (patch)
tree383fc59b697ed9b1912805f3c16ceddc316c4bab
parentf44f0f41f4a1912e28efd540a7042f82a5526b32 (diff)
downloadbazarr-2bcb5a6030da2e55a24231311c056ecc40d14c32.tar.gz
bazarr-2bcb5a6030da2e55a24231311c056ecc40d14c32.zip
Bazarr won't start anymore when launched with Python ealier than 3.7. No more compatibility with 2.7.x
-rw-r--r--bazarr.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bazarr.py b/bazarr.py
index 581689f76..dad287ab5 100644
--- a/bazarr.py
+++ b/bazarr.py
@@ -18,13 +18,13 @@ def check_python_version():
minimum_py2_str = ".".join(str(i) for i in minimum_py2_tuple)
minimum_py3_str = ".".join(str(i) for i in minimum_py3_tuple)
- if (int(python_version[0]) == minimum_py3_tuple[0] and int(python_version[1]) < minimum_py3_tuple[1]) or \
- (int(python_version[0]) != minimum_py3_tuple[0] and int(python_version[0]) != minimum_py2_tuple[0]):
+ if int(python_version[0]) < 3:
print("Python " + minimum_py3_str + " or greater required. "
"Current version is " + platform.python_version() + ". Please upgrade Python.")
sys.exit(1)
- elif int(python_version[0]) == minimum_py2_tuple[0] and int(python_version[1]) < minimum_py2_tuple[1]:
- print("Python " + minimum_py2_str + " or greater required. "
+ elif (int(python_version[0]) == minimum_py3_tuple[0] and int(python_version[1]) < minimum_py3_tuple[1]) or \
+ (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() + ". Please upgrade Python.")
sys.exit(1)