summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGilbN <[email protected]>2022-01-04 02:41:53 +0100
committerGitHub <[email protected]>2022-01-03 20:41:53 -0500
commit166c2a745ad9535ab21ce2ff5f8a36da21451654 (patch)
treeeb18e80b994d58e784a1f8d872f81e565eb38bee
parent79c2d1161feb89d2178061edac4304bbb78aca56 (diff)
downloadbazarr-166c2a745ad9535ab21ce2ff5f8a36da21451654.tar.gz
bazarr-166c2a745ad9535ab21ce2ff5f8a36da21451654.zip
no log: Added extra try/except in GetRadarrInfo.version()v1.0.3-beta.4
-rw-r--r--bazarr/utils.py8
1 files 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'