Write erroring wiki

This commit is contained in:
Frisk 2022-05-29 14:21:19 +02:00
parent d47fd6df5c
commit 92d39d451c
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC

View file

@ -1,3 +1,5 @@
import sys
import aiohttp
import asyncio
import logging.config
@ -299,7 +301,7 @@ async def scan_group(group: str):
recent_changes = recent_changes_resp['query']['recentchanges']
recent_changes.reverse()
except KeyError:
logger.error("recent_changes_resp returned KeyError. skipping this check. (usually this happens when the wiki doesn't respond properly, it's pretty normal)")
logger.error("recent_changes_resp returned KeyError on {}. skipping this check. (usually this happens when the wiki doesn't respond properly, it's pretty normal)".format(queued_wiki.url))
continue
if extended:
await process_mwmsgs(recent_changes_resp, local_wiki, mw_msgs)
@ -575,4 +577,4 @@ async def main_loop():
except asyncio.CancelledError:
return
asyncio.run(main_loop(), debug=False)
asyncio.run(main_loop(), debug=False)