diff options
author | Louis Vézina <[email protected]> | 2019-09-18 11:35:19 -0400 |
---|---|---|
committer | Louis Vézina <[email protected]> | 2019-09-18 11:35:19 -0400 |
commit | e7bebc495f1d5ba9ee454b6d2cc4ecef27e84b87 (patch) | |
tree | d19b59b8fc24e1c406246abf84f0828ac28b5c76 | |
parent | 3d2137e94ea6f35050f7380ba4e197a989d113bb (diff) | |
download | bazarr-e7bebc495f1d5ba9ee454b6d2cc4ecef27e84b87.tar.gz bazarr-e7bebc495f1d5ba9ee454b6d2cc4ecef27e84b87.zip |
Fix for Python minor version containing something else than digits.
-rw-r--r-- | bazarr.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -5,6 +5,7 @@ import time import os import sys import platform +import re from bazarr.get_args import args @@ -18,7 +19,7 @@ def check_python_version(): print "Python 3 isn't supported. Please use Python " + minimum_python_version + " or greater." os._exit(0) - elif int(python_version[1]) < minimum_python_version_tuple[1] or int(python_version[2].rstrip('+')) < minimum_python_version_tuple[2]: + elif int(python_version[1]) < minimum_python_version_tuple[1] or int(re.search(r'\d+', python_version[2]).group()) < minimum_python_version_tuple[2]: print "Python " + minimum_python_version + " or greater required. Current version is " + platform.python_version() + ". Please upgrade Python." os._exit(0) |