CVS: tmda/TMDA Util.py,1.101,1.102 ChangeLog,1.282,1.283

Timothy Legant <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda/TMDA
In directory sc8-pr-cvs1:/tmp/cvs-serv27940/TMDA

Modified Files:
	Util.py ChangeLog 
Log Message:
Use HeaderParsedGenerator in Util.msg_as_string() rather than the
standard Generator, which fails on messages parsed with HeaderParser.



Index: Util.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Util.py,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- Util.py	11 Jul 2003 23:02:59 -0000	1.101
+++ Util.py	31 Jul 2003 20:08:37 -0000	1.102
@@ -535,9 +535,11 @@
 
     unixfrom forces the printing of the envelope header delimiter.
     Default is False."""
-    from email.Generator import Generator
+    from email.Generator import HeaderParsedGenerator
     fp = StringIO()
-    g = Generator(fp, mangle_from_=mangle_from_, maxheaderlen=maxheaderlen)
+    g = HeaderParsedGenerator(fp,
+                              mangle_from_=mangle_from_,
+                              maxheaderlen=maxheaderlen)
     g.flatten(msg, unixfrom=unixfrom)
     return fp.getvalue()
 

Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/ChangeLog,v
retrieving revision 1.282
retrieving revision 1.283
diff -u -r1.282 -r1.283
--- ChangeLog	19 Jul 2003 04:29:26 -0000	1.282
+++ ChangeLog	31 Jul 2003 20:08:37 -0000	1.283
@@ -1,3 +1,9 @@
+2003-07-31  Tim Legant  <[email protected]>
+
+	* Util.py (msg_as_string): Use HeaderParsedGenerator rather than
+	the standard Generator, which fails on messages parsed with
+	HeaderParser.
+
 2003-07-18  Tim Legant  <[email protected]>
 
 	* MTA.py (MTA.deliver, MTA.stop, Qmail.deliver): Added support for

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.