Add missing capture of exception to variable.

This commit is contained in:
Christopher Broderick 2023-10-25 17:15:45 +01:00
parent bc7e189a5c
commit e040bcac77

View File

@ -102,7 +102,7 @@ def process_email(quiet: bool = False, debug_to_stdout: bool = False):
logger.info(log_msg) logger.info(log_msg)
if debug_to_stdout: if debug_to_stdout:
print(log_msg) print(log_msg)
except Exception: except Exception as e:
logger.error("Queue processing failed: {q.slug} -- {e}", exc_info=True) logger.error("Queue processing failed: {q.slug} -- {e}", exc_info=True)
if debug_to_stdout: if debug_to_stdout:
print(f"Queue processing failed: {q.slug}") print(f"Queue processing failed: {q.slug}")