From e7bebc495f1d5ba9ee454b6d2cc4ecef27e84b87 Mon Sep 17 00:00:00 2001 From: Louis Vézina <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 18 Sep 2019 11:35:19 -0400 Subject: Fix for Python minor version containing something else than digits. --- bazarr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bazarr.py b/bazarr.py index 4448dc16c..1166ad7f4 100644 --- a/bazarr.py +++ b/bazarr.py @@ -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) -- cgit v1.2.3