From 96aa04569979d1699a26b4408f060c51547b4478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sat, 16 Nov 2019 09:17:31 -0500 Subject: [PATCH] Fix for providers throttling in Python 3. --- bazarr/get_providers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazarr/get_providers.py b/bazarr/get_providers.py index a85bca7d9..27d213fac 100644 --- a/bazarr/get_providers.py +++ b/bazarr/get_providers.py @@ -155,7 +155,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.message.startswith('unsupported pickle protocol'): + if cls_name == 'ValueError' and exception.args[0].startswith('unsupported pickle protocol'): for fn in subliminal_cache_region.backend.all_filenames: try: os.remove(fn) @@ -168,7 +168,7 @@ def provider_throttle(name, exception): settings.write(handle) logging.info("Throttling %s for %s, until %s, because of: %s. Exception info: %r", name, throttle_description, - throttle_until.strftime("%y/%m/%d %H:%M"), cls_name, exception.message) + throttle_until.strftime("%y/%m/%d %H:%M"), cls_name, exception.args[0]) def throttled_count(name):