summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2023-09-14 06:39:45 -0400
committerGitHub <[email protected]>2023-09-14 06:39:45 -0400
commitb736f267b5dc5f6eaffa19021858ccc77278cdaa (patch)
tree93914efd329c5fe640cea4bce0d180eed9e5c58a
parent9cf21242ca30ad2d7642de430d3a17d464ae04e1 (diff)
downloadbazarr-b736f267b5dc5f6eaffa19021858ccc77278cdaa.tar.gz
bazarr-b736f267b5dc5f6eaffa19021858ccc77278cdaa.zip
Fixed IndexError in provider throttling function
-rw-r--r--bazarr/app/get_providers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bazarr/app/get_providers.py b/bazarr/app/get_providers.py
index 23839046b..d920cc074 100644
--- a/bazarr/app/get_providers.py
+++ b/bazarr/app/get_providers.py
@@ -337,7 +337,7 @@ def provider_throttle(name, exception):
throttle_until = datetime.datetime.now() + throttle_delta
if cls_name not in VALID_COUNT_EXCEPTIONS or throttled_count(name):
- if cls_name == 'ValueError' and exception.args[0].startswith('unsupported pickle protocol'):
+ if cls_name == 'ValueError' and isinstance(exception.args, tuple) and len(exception.args) and exception.args[0].startswith('unsupported pickle protocol'):
for fn in subliminal_cache_region.backend.all_filenames:
try:
os.remove(fn)