1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-23 16:23:41 +00:00

no log: Added extra try/except in GetRadarrInfo.version()

This commit is contained in:
GilbN 2022-01-04 02:41:53 +01:00 committed by GitHub
parent 79c2d1161f
commit 166c2a745a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -319,8 +319,12 @@ class GetRadarrInfo:
else: else:
raise json.decoder.JSONDecodeError raise json.decoder.JSONDecodeError
except json.decoder.JSONDecodeError: except json.decoder.JSONDecodeError:
try:
rv = url_radarr() + "/api/v3/system/status?apikey=" + settings.radarr.apikey rv = url_radarr() + "/api/v3/system/status?apikey=" + settings.radarr.apikey
radarr_version = requests.get(rv, timeout=60, verify=False, headers=headers).json()['version'] radarr_version = requests.get(rv, timeout=60, verify=False, headers=headers).json()['version']
except json.decoder.JSONDecodeError:
logging.debug('BAZARR cannot get Radarr version')
radarr_version = 'unknown'
except Exception: except Exception:
logging.debug('BAZARR cannot get Radarr version') logging.debug('BAZARR cannot get Radarr version')
radarr_version = 'unknown' radarr_version = 'unknown'