Fixed issue with Python deprecation warning. #2218

pull/2222/head v1.2.5-beta.10
morpheus65535 1 year ago
parent 7e211f6250
commit f58d1a915d

@ -106,7 +106,7 @@ def get_local_announcements():
})
# deprecated Python versions
if deprecated_python_version:
if deprecated_python_version():
announcements.append({
'text': 'Starting with Bazarr 1.4, support for Python 3.7 will get dropped. Upgrade your current version of'
' Python ASAP to get further updates.',

@ -70,13 +70,13 @@ def check_if_new_update():
if not args.no_update:
release = None
if use_prerelease:
if deprecated_python_version:
if deprecated_python_version():
release = next((item['name'].lstrip('v') for item in data if
semver.VersionInfo.parse('1.3.1') > semver.VersionInfo.parse(item['name'].lstrip('v'))))
else:
release = next((item for item in data), None)
else:
if deprecated_python_version:
if deprecated_python_version():
next((item['name'].lstrip('v') for item in data if
not item['prerelease'] and semver.VersionInfo.parse('1.3.1') > semver.VersionInfo.parse(
item['name'].lstrip('v'))))
@ -85,7 +85,7 @@ def check_if_new_update():
if release and 'name' in release:
logging.debug('BAZARR last release available is {}'.format(release['name']))
if deprecated_python_version:
if deprecated_python_version():
logging.warning('BAZARR is using a deprecated Python version, you must update Python to get latest '
'version available.')

Loading…
Cancel
Save