From aecf740c5e0c6fbb8d2a6505688a61976b298d17 Mon Sep 17 00:00:00 2001 From: Paul Bugni Date: Thu, 11 Jan 2024 15:25:38 -0800 Subject: [PATCH] TimeoutLock.__exit__() fixed to correctly generate a stack in the log file. --- portal/timeout_lock.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/portal/timeout_lock.py b/portal/timeout_lock.py index 75f91a6a3..87cc611db 100644 --- a/portal/timeout_lock.py +++ b/portal/timeout_lock.py @@ -62,12 +62,8 @@ def __exit__(self, exc_type, exc_value, traceback): # To avoid interrupting iterative lock use, return truthy # value to stop exception propagation - see PEP if exc_type is not None: - error_message = f"{exc_type}" - if exc_value: - error_message += f": {exc_value}" - if traceback: - error_message += f"; {traceback}" - current_app.logger.error(error_message) + current_app.logger.exception( + "TimeoutLock trapped exception:", exc_info=True) return True def is_locked(self):