Update of /cvsroot/mailman/mailman/Mailman
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12078
Modified Files:
Tag: Release_2_1-maint
Message.py
Log Message:
Wrapping set_payload() to encode contents into qp/base64 upon setting.
This incorporates Python email patch:
http://sourceforge.net/tracker/?func=detail&aid=1409455&group_id=5470&atid=105470
and eventually be backed out if email package is updated.
Index: Message.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Message.py,v
retrieving revision 2.25.2.9
retrieving revision 2.25.2.10
diff -u -d -r2.25.2.9 -r2.25.2.10
--- Message.py 30 Dec 2005 18:50:07 -0000 2.25.2.9
+++ Message.py 29 Jan 2006 05:05:19 -0000 2.25.2.10
@@ -199,6 +199,17 @@
except (UnicodeError, LookupError, ValueError):
return failobj
+ def set_payload(self, payload, charset=None):
+ """Set the payload to the given value (Override email package).
+ Payload is converted to a MIME message body when this is called.
+ """
+ email.Message.Message.set_payload(self, payload, charset)
+ if self.get('content-transfer-encoding') in \
+ ('quoted-printable', 'base64'):
+ cset = self.get_charset()
+ if cset:
+ self._payload = cset.body_encode(self._payload)
+ self._charset = None
class UserNotification(Message):
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org