diff options
author | morpheus65535 <[email protected]> | 2022-12-13 09:06:06 -0500 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2022-12-13 09:06:06 -0500 |
commit | 993168e901e47b5932bd0abfc784909ac14a3199 (patch) | |
tree | ee79441ae623f950246b775fb1317720f8423785 | |
parent | 0e79fbadbadf3b3af9408e587ddb2f663dbd9613 (diff) | |
download | bazarr-993168e901e47b5932bd0abfc784909ac14a3199.tar.gz bazarr-993168e901e47b5932bd0abfc784909ac14a3199.zip |
Added logging to legendasdivx provider when lxml isn't installed properly. #2009
-rw-r--r-- | libs/subliminal_patch/providers/legendasdivx.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/subliminal_patch/providers/legendasdivx.py b/libs/subliminal_patch/providers/legendasdivx.py index 8a83d9b60..46a52ffd1 100644 --- a/libs/subliminal_patch/providers/legendasdivx.py +++ b/libs/subliminal_patch/providers/legendasdivx.py @@ -9,6 +9,7 @@ from urllib.parse import quote from urllib.parse import parse_qs from requests.exceptions import HTTPError import rarfile +from bs4 import FeatureNotFound from guessit import guessit from requests.exceptions import RequestException @@ -204,6 +205,10 @@ class LegendasdivxProvider(Provider): raise IPAddressBlocked("LegendasDivx.pt :: Your IP is blocked on this server.") logger.error("Legendasdivx.pt :: HTTP Error %s", e) raise TooManyRequests("Legendasdivx.pt :: HTTP Error %s", e) + except FeatureNotFound: + logger.error("LegendasDivx.pt :: lxml Python module isn't installed. Make sure to install requirements.") + raise ConfigurationError("LegendasDivx.pt :: lxml Python module isn't installed. Make sure to install " + "requirements.") except Exception as e: logger.error("LegendasDivx.pt :: Uncaught error: %r", e) raise ServiceUnavailable("LegendasDivx.pt :: Uncaught error: %r", e) |