mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2025-04-01 08:45:29 +02: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.
|
StorySourceError: If the server does not return HTTP 200 OK.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
response = requests.get(url, params=kwargs)
|
response = requests.get(url, params=kwargs, timeout=60)
|
||||||
except IOError as e:
|
except OSError as e:
|
||||||
raise StorySourceError("Could not read from server.") from e
|
raise StorySourceError("Could not read from server.") from e
|
||||||
|
|
||||||
if not response.ok:
|
if not response.ok:
|
||||||
|
|
Loading…
Add table
Reference in a new issue