Message308362
Yes. I think errors=replace is a good solution. In Mailman, we have our own mailman.email.message.Message class which is a subclass of email.message.Message and what we do to work around this and issue27321 is override as_string() with:
def as_string(self):
# Work around for https://bugs.python.org/issue27321 and
# https://bugs.python.org/issue32330.
try:
value = email.message.Message.as_string(self)
except (KeyError, UnicodeEncodeError):
value = email.message.Message.as_bytes(self).decode(
'ascii', 'replace')
return value |
|
Date |
User |
Action |
Args |
2017-12-15 03:23:27 | msapiro | set | recipients:
+ msapiro, barry, r.david.murray |
2017-12-15 03:23:27 | msapiro | set | messageid: <1513308207.85.0.213398074469.issue32330@psf.upfronthosting.co.za> |
2017-12-15 03:23:27 | msapiro | link | issue32330 messages |
2017-12-15 03:23:27 | msapiro | create | |
|