Unverified Commit 9861fdf7 authored by Isis Lovecruft's avatar Isis Lovecruft
Browse files

Add try/except around parent class errback call in SMTPAutoresponder.

parent c509a0ab
......@@ -531,8 +531,14 @@ class SMTPAutoresponder(smtp.SMTPClient):
error = fail
logging.error(error)
# This handles QUIT commands, disconnecting, and closing the transport:
smtp.SMTPClient.sendError(self, fail)
try:
# This handles QUIT commands, disconnecting, and closing the
# transport:
smtp.SMTPClient.sendError(self, fail)
# We might not have `transport` and `protocol` attributes, depending
# on when and where the error occurred, so just catch and log it:
except Exception as error:
logging.error(error)
def reply(self):
"""Reply to an incoming email. Maybe.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment