------------------------------------------------------------
revno: 1868
fixes bug: https://launchpad.net/bugs/1921682
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Wed 2021-03-31 14:56:21 -0700
message:
Improve fix for lp:1921682.
modified:
Mailman/Queue/CommandRunner.py
--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1
Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Queue/CommandRunner.py'
--- Mailman/Queue/CommandRunner.py 2021-03-30 19:32:42 +0000
+++ Mailman/Queue/CommandRunner.py 2021-03-31 21:56:21 +0000
@@ -101,8 +101,10 @@
return
body = part.get_payload(decode=True)
if (part.get_content_charset(None)):
- body = unicode(body, part.get_content_charset()).encode(
- Utils.GetCharSet(self.msgdata['lang']))
+ body = unicode(body, part.get_content_charset(),
+ errors='replace').encode(
+ Utils.GetCharSet(self.msgdata['lang']),
+ errors='replace')
# text/plain parts better have string payloads
assert isinstance(body, StringType) or isinstance(body, UnicodeType)
lines = body.splitlines()
_______________________________________________
Mailman-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-checkins.python.org/
Member address: [email protected]