From eb8f482eed83112bee986f919150145c16ff63db Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Tue, 24 Aug 2021 22:33:22 -0400 Subject: [PATCH] no log: fix for opensubtitles.com login issue. --- libs/subliminal_patch/providers/opensubtitlescom.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/subliminal_patch/providers/opensubtitlescom.py b/libs/subliminal_patch/providers/opensubtitlescom.py index 7d04a6026..ced5f85ed 100644 --- a/libs/subliminal_patch/providers/opensubtitlescom.py +++ b/libs/subliminal_patch/providers/opensubtitlescom.py @@ -167,7 +167,7 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider): raise ProviderError('Invalid JSON returned by provider') else: region.set("oscom_token", self.token) - return True + return elif r.status_code == 401: raise AuthenticationError('Login failed: {}'.format(r.reason)) elif r.status_code == 429: @@ -176,8 +176,6 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider): raise ProviderError(r.reason) else: raise ProviderError('Bad status code: {}'.format(r.status_code)) - finally: - return False @region.cache_on_arguments(expiration_time=SHOW_EXPIRATION_TIME) def search_titles(self, title):