mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-23 06:21:05 +00:00
Fixed issue with Python deprecation warning. #2218
This commit is contained in:
parent
7e211f6250
commit
f58d1a915d
2 changed files with 4 additions and 4 deletions
|
@ -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…
Reference in a new issue