From 166c2a745ad9535ab21ce2ff5f8a36da21451654 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Tue, 4 Jan 2022 02:41:53 +0100 Subject: [PATCH] no log: Added extra try/except in GetRadarrInfo.version() --- bazarr/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bazarr/utils.py b/bazarr/utils.py index a61df9c55..f75776d37 100644 --- a/bazarr/utils.py +++ b/bazarr/utils.py @@ -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'