[tor-commits] [gettor/master] Treat all email sending exceptions the same
cohosh at torproject.org
cohosh at torproject.org
Mon Mar 8 00:16:23 UTC 2021
commit fc9e1ed212d54cf682601a1caaa7e289a43d50cf
Author: Cecylia Bocovich <cohosh at torproject.org>
Date: Sun Mar 7 19:15:21 2021 -0500
Treat all email sending exceptions the same
In the previous commit, we forgot to remove requests that trigger
exceptions other than SMTPClientError.
---
gettor/services/email/sendmail.py | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/gettor/services/email/sendmail.py b/gettor/services/email/sendmail.py
index 869373d..9c703f3 100644
--- a/gettor/services/email/sendmail.py
+++ b/gettor/services/email/sendmail.py
@@ -230,14 +230,9 @@ class Sendmail(object):
id=id, service="email", date=date
)
- except smtp.SMTPClientError as e:
+ except Exception as e:
yield self.conn.remove_request(
id=id, service="email", date=date
)
log.error(strings.redact_emails(
"Error sending email to {}:{}.".format(id, e)))
-
- except Exception as e:
- log.error(
- strings.redact_emails("Error sending email:{}.".format(e))
- )
More information about the tor-commits
mailing list