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

pull/1666/head v1.0.3-beta.4
GilbN 2 years ago committed by GitHub
parent 79c2d1161f
commit 166c2a745a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save