Catch Exception?

This should catch the exception...

And log based on that (it won't but maybe I can see better where my
error is).
This commit is contained in:
Jigme Datse Yli-Rasku 2024-05-29 23:40:08 -07:00
parent 66c37c2af6
commit d451cc0920
2 changed files with 4 additions and 3 deletions

View File

@ -31,3 +31,4 @@ This is our current version trying to communicate between courier and mailman3.
* OK, parsing port number, and setting default. * OK, parsing port number, and setting default.
* Logging error (I hope), when lmtp fails to be created. * Logging error (I hope), when lmtp fails to be created.
* Maybe this is better? * Maybe this is better?
* Catch exception, log based on that?

View File

@ -65,7 +65,7 @@ try:
# 5xx error # 5xx error
else: else:
raise raise
except: except smtplib.SMTPException as e:
logger.error('lmtp error') logger.error('lmtp error')
#logger.error('lmtp failed errorno: %s, message: %s', e.errno, e.strerror) logger.error('lmtp failed errorno: %s, message: %s', e.errno, e.strerror)
exit(100) exit(100)