From c8080e60b3775947bc5bf5963d49be7e4eac6b6d Mon Sep 17 00:00:00 2001 From: Frisk Date: Sat, 15 Feb 2025 09:27:04 +0100 Subject: [PATCH] further fix to logging a failure --- src/wiki.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wiki.py b/src/wiki.py index b923458..11c3126 100644 --- a/src/wiki.py +++ b/src/wiki.py @@ -486,7 +486,7 @@ class Wiki: request = await self.fetch_wiki(amount=amount) self.client.last_request = request except (aiohttp.ServerTimeoutError, asyncio.TimeoutError, WikiServerError, ServerError) as e: - self.statistics.update(Log(type=LogType.CONNECTION_ERROR, title=str(e.exception))) + self.statistics.update(Log(type=LogType.CONNECTION_ERROR, title=str(str(e.exception) if hasattr(e, "exception") else repr(e)))) amount_of_failures = len(self.statistics.last_connection_failures()[0]) if amount_of_failures < 2: await asyncio.sleep(5.0)