------------------------------------------------------------
revno: 1160
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Tue 2009-01-13 10:53:19 -0800
message:
Work around email 3.0.1 issue when set_payload charset arg is unicode.
modified:
Mailman/Handlers/Scrubber.py
=== modified file 'Mailman/Handlers/Scrubber.py'
--- a/Mailman/Handlers/Scrubber.py 2008-12-01 04:30:43 +0000
+++ b/Mailman/Handlers/Scrubber.py 2009-01-13 18:53:19 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2008 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2009 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -167,6 +167,9 @@
# message by a text (scrubbing).
del msg['content-type']
del msg['content-transfer-encoding']
+ if isinstance(charset, unicode):
+ # email 3.0.1 (python 2.4) doesn't like unicode
+ charset = charset.encode('us-ascii')
msg.set_payload(text, charset)
--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1
You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org