mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 05:17:59 +01:00
Add FimfarchiveFetcher timeout to prevent lockups
This commit is contained in:
parent
7199d47395
commit
47a85ddd70
1 changed files with 2 additions and 2 deletions
|
@ -171,8 +171,8 @@ class FimfictionFetcher(Fetcher):
|
|||
StorySourceError: If the server does not return HTTP 200 OK.
|
||||
"""
|
||||
try:
|
||||
response = requests.get(url, params=kwargs)
|
||||
except IOError as e:
|
||||
response = requests.get(url, params=kwargs, timeout=60)
|
||||
except OSError as e:
|
||||
raise StorySourceError("Could not read from server.") from e
|
||||
|
||||
if not response.ok:
|
||||
|
|
Loading…
Reference in a new issue