Fixed other issue with timeout error on python 3.7

This commit is contained in:
Frisk 2020-07-29 01:33:14 +02:00
parent c23937e971
commit b04efc10dc
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -44,7 +44,7 @@ class Wiki:
"rclimit": amount, "rctype": "edit|new|log|categorize", "siprop": "namespaces|general"} "rclimit": amount, "rctype": "edit|new|log|categorize", "siprop": "namespaces|general"}
try: try:
response = await session.get(url_path, params=params) response = await session.get(url_path, params=params)
except (aiohttp.ClientConnectionError, aiohttp.ServerTimeoutError, asyncio.exceptions.TimeoutError): except (aiohttp.ClientConnectionError, aiohttp.ServerTimeoutError, asyncio.TimeoutError):
logger.exception("A connection error occurred while requesting {}".format(url_path)) logger.exception("A connection error occurred while requesting {}".format(url_path))
raise WikiServerError raise WikiServerError
return response return response