From 66c37c2af6764c26e5e8172799a183f813a3bc7d Mon Sep 17 00:00:00 2001 From: Jigme Datse Yli-Rasku Date: Wed, 29 May 2024 23:36:07 -0700 Subject: [PATCH] Logging simplified This isn't catching the exception, just logging before exiting. --- docs/courier-to-mailman3.md | 3 ++- source/courier-to-mailman3.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/courier-to-mailman3.md b/docs/courier-to-mailman3.md index 819ed27..edea69e 100644 --- a/docs/courier-to-mailman3.md +++ b/docs/courier-to-mailman3.md @@ -29,4 +29,5 @@ This is our current version trying to communicate between courier and mailman3. * Clean up logging to not log what was logged for logging diagnostics. * Logging host and port on same line. * OK, parsing port number, and setting default. -* Logging error (I hope), when lmtp fails to be created. \ No newline at end of file +* Logging error (I hope), when lmtp fails to be created. + * Maybe this is better? \ No newline at end of file diff --git a/source/courier-to-mailman3.py b/source/courier-to-mailman3.py index c0621b5..1f20ae5 100644 --- a/source/courier-to-mailman3.py +++ b/source/courier-to-mailman3.py @@ -65,6 +65,7 @@ try: # 5xx error else: raise -except smtplib.SMTPEXception as e: - logger.error('lmtp failed errorno: %s, message: %s', e.errno, e.strerror) +except: + logger.error('lmtp error') + #logger.error('lmtp failed errorno: %s, message: %s', e.errno, e.strerror) exit(100) \ No newline at end of file