From: Thorsten Date: Mon, 11 Apr 2022 12:18:36 +0000 (+0200) Subject: some lib-/platform related scenario lets the bot fail on raised exceptions X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=cd751c518daa6ce3e15706e43411afc835bd1aad;p=urlbot-v3.git some lib-/platform related scenario lets the bot fail on raised exceptions (while on others, it's caught) --- diff --git a/distbot/bot/bot.py b/distbot/bot/bot.py index c5170ae..ab31191 100644 --- a/distbot/bot/bot.py +++ b/distbot/bot/bot.py @@ -156,7 +156,12 @@ class Bot(slixmpp.ClientXMPP): if self.muted: return - nick_offset, routing_key = self.get_amqp_routing_key(self.nick, msg) + try: + nick_offset, routing_key = self.get_amqp_routing_key(self.nick, msg) + except ValueError as e: + logger.warning("Could not process message, probably failed quoting or similar.") + logger.exception(e) + return if msg["type"] == "groupchat": recipient = msg["mucroom"]