Fix a typo in bouncing, wrap UnicodeEncodeError in custom exception
This commit is contained in:
parent
d3f1aa3a02
commit
0ef3012e33
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ class MailEncryptionProxy:
|
|||
if conf.should_log_headers():
|
||||
LOG.error('Erroneous message headers: %s', self._beginning(envelope))
|
||||
|
||||
return xport.RESULT_ERRORR
|
||||
return xport.RESULT_ERROR
|
||||
|
||||
return xport.RESULT_OK
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ class KeepIntact(MailOperation):
|
|||
"""Return MESSAGE unmodified."""
|
||||
try:
|
||||
return message.as_bytes(policy=SMTPUTF8)
|
||||
except IndexError as e:
|
||||
except (IndexError, UnicodeEncodeError) as e:
|
||||
raise MailSerialisationException(e)
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in a new issue