Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Handle exception when api_bluray fails to get content #2468

Merged
merged 3 commits into from May 3, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion flexget/plugins/internal/api_bluray.py
Expand Up @@ -126,7 +126,10 @@ def __init__(self, title, year):
# Used for parsing some more data, sadly with soup
self.url = result['url']

movie_info_response = requests.get(self.url).content
try:
movie_info_response = requests.get(self.url).content
except (requests.RequestException, ConnectionError) as e:
raise PluginError("Couldn't connect to blu-ray.com. %s" % self.url)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, now i'm thinking maybe PluginWarning would be better here so we won't abort the task. @gazpachoking @cvium WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a LookupError?


movie_info = get_soup(movie_info_response)

Expand Down