From cd751c518daa6ce3e15706e43411afc835bd1aad Mon Sep 17 00:00:00 2001 From: Thorsten Date: Mon, 11 Apr 2022 14:18:36 +0200 Subject: [PATCH] some lib-/platform related scenario lets the bot fail on raised exceptions (while on others, it's caught) --- distbot/bot/bot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"] -- 2.39.5