From 0c4268a0a37b8c4a40e6be1a437a8b7c52486098 Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 10 Jan 2022 18:13:06 +0100 Subject: [PATCH] core/MMBot.py --- core/MMBot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/MMBot.py b/core/MMBot.py index 633631b..795a868 100644 --- a/core/MMBot.py +++ b/core/MMBot.py @@ -227,8 +227,8 @@ class MMBot(): try: if self.wsmodules[evtype][module_name].on_WS_EVENT(event_data): self.command_stats_inc("ws::"+evtype+"::"+module_name) - except Exception as e: - self.bot.debug_chan("##### Exception in ``"+evtype+"::"+module_name+"``: ``"+repr(e)+"``\n# :boom::boom::boom::boom::boom:") + except Exception as exc: + self.debug_chan("##### Exception in ``"+evtype+"::"+module_name+"``: ``"+repr(exc)+"``\n# :boom::boom::boom::boom::boom:") logger.exception("websocket_handler(): Exception in: %s\nEvent-data:%s", evtype+"::"+module_name, pprint.pformat(event_data)) @@ -307,8 +307,8 @@ class MMBot(): # always try to fail to retain userinput. If previously responded to, nothing will happen. self.respond(400, if_nonzero_secondary='ignore') - except Exception as e: - self.bot.debug_chan("##### Exception in ``"+self.path.strip("/")+"``: ``"+repr(e)+"``\n# :boom::boom::boom::boom::boom:") + except Exception as exc: + self.bot.debug_chan("##### Exception in ``"+self.path.strip("/")+"``: ``"+repr(exc)+"``\n# :boom::boom::boom::boom::boom:") logger.exception("do_POST(): Exception in: %s\nRequest-data:%s", self.path.strip("/"), pprint.pformat(data)) self.respond_cmd_err("A serverside error occured. @someone should have been contacted.", http_code=500, if_nonzero_secondary='ignore') -- 2.43.0