From 03c1f47781764134d0461952338b4e684769943a Mon Sep 17 00:00:00 2001 From: Stefano Ortolani Date: Fri, 7 Mar 2025 14:03:03 +0000 Subject: [PATCH] fix: remove empty variables and improve JSON compatibility --- misp_modules/__main__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/misp_modules/__main__.py b/misp_modules/__main__.py index 3ce7f6f9..693a52e6 100644 --- a/misp_modules/__main__.py +++ b/misp_modules/__main__.py @@ -47,7 +47,6 @@ # Global variables MODULES_HANDLERS = {} -HELPERS_HANDLERS = {} LOGGER = logging.getLogger("misp-modules") # Module that, if present, guarantees that the extra 'all' has been installed @@ -129,8 +128,8 @@ class HealthCheck(tornado.web.RequestHandler): """HealthCheck handler.""" def get(self): - LOGGER.debug("Healthcheck request") - self.write(b'{"status": true}') + LOGGER.debug("HealthCheck request") + self.write(orjson.dumps({"status": True})) class ListModules(tornado.web.RequestHandler): @@ -198,7 +197,6 @@ def post(self): def main(): """Init function.""" - global HELPERS_HANDLERS global MODULES_HANDLERS signal.signal(signal.SIGINT, handle_signal)