From 512e61cadcd024487e3ab9d98155c3e9184a354e Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 20 May 2022 14:45:46 +0200 Subject: [PATCH] fix: [abstract module] exception traceback #145 --- bin/modules/abstract_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/modules/abstract_module.py b/bin/modules/abstract_module.py index 555a6bc9..635e1199 100644 --- a/bin/modules/abstract_module.py +++ b/bin/modules/abstract_module.py @@ -102,6 +102,7 @@ class AbstractModule(ABC): self.compute(message) except Exception as err: trace = traceback.format_tb(err.__traceback__) + trace = ''.join(trace) self.redis_logger.critical(f"Error in module {self.module_name}: {err}") self.redis_logger.critical(f"Module {self.module_name} input message: {message}") self.redis_logger.critical(trace) @@ -109,8 +110,7 @@ class AbstractModule(ABC): print(f"ERROR: {err}") print(f'MESSAGE: {message}') print('TRACEBACK:') - for line in trace: - print(line) + print(trace) # remove from set_module ## check if item process == completed