From 0e8634798831dc96c2a676260d986aa0abc495c4 Mon Sep 17 00:00:00 2001 From: Someone Date: Thu, 6 Jan 2022 23:33:21 +0100 Subject: [PATCH] core/MMBot.py --- core/MMBot.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/core/MMBot.py b/core/MMBot.py index 91eaa42..bd44496 100644 --- a/core/MMBot.py +++ b/core/MMBot.py @@ -140,7 +140,6 @@ class MMBot(): if self.mmws: self.mmws.close_websocket() - # todo: stop webserver + WS? for team_modules in self.modules: for module in self.modules[team_modules]: @@ -169,8 +168,6 @@ class MMBot(): self.command_stats_inc("internal::SIGUSR1") self.command_stats_dump() - # TODO: reinit teams. - for team_modules in self.modules: for module in self.modules[team_modules]: self.modules[team_modules][module]._on_SIGUSR1(self.sigusr1_cnt) @@ -281,8 +278,7 @@ class MMBot(): # handle call - logger.info("do_POST(): request incomming.") - pprint.pprint(data) + logger.debug("do_POST(): request incomming.") try: module = 'not yet known' splitpath = self.path.strip("/").split("/") @@ -388,8 +384,6 @@ class MMBot(): data = {} # First response - #pprint.pprint(http_code) - #pprint.pprint(data) if not self.handled: if http_code >= 600 or http_code < 100: raise Exception("respond(): Primary response must have a valid http code.") @@ -400,7 +394,7 @@ class MMBot(): self.send_header("Content-Length", len(bytes(json.dumps(data), "utf8"))) self.end_headers() self.wfile.write(bytes(json.dumps(data), "utf8")) - logger.info("respond(): Primary response send.") + logger.debug("respond(): Primary response send.") # Secondary responses @@ -421,11 +415,11 @@ class MMBot(): raise Exception("respond(): Secondary response attempt without response url.") - logger.info("respond(): Secondary response. Using responseURL: %s", self.responseURL) + logger.debug("respond(): Secondary response. Using responseURL: %s", self.responseURL) req = Request(self.responseURL, data=bytes(json.dumps(data), "utf8"), method='POST') req.add_header("Content-Type", "application/json") conn = urlopen(req, timeout=3) - logger.info("respond(): Secondary response send. Status: %s", conn.status) + logger.debug("respond(): Secondary response send. Status: %s", conn.status) -- 2.43.0