Update of /cvsroot/mailman/mailman/Mailman
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13146

Modified Files:
        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.31
retrieving revision 2.32
diff -u -d -r2.31 -r2.32
--- Message.py  30 Dec 2005 18:56:44 -0000      2.31
+++ Message.py  29 Jan 2006 05:07:46 -0000      2.32
@@ -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

Reply via email to