[issue1459867] Message.as_string should use "mangle_from_=unixfrom"?

kxroberto report at bugs.python.org
Sat Mar 21 11:06:05 CET 2009


kxroberto <kxroberto at users.sourceforge.net> added the comment:

"g = Generator(fp,mangle_from_=unixfrom)"
in that code location below? 
It produced exceptions often when message lines (or headerlines e.g.
Subject also when I remember right) begin with the char ">" or so.

--- Message.py.orig	2004-12-22 16:01:38.000000000 +0100
+++ Message.py	2006-03-28 10:59:42.000000000 +0200
@@ -126,7 +126,7 @@
         """
         from email.Generator import Generator
         fp = StringIO()
-        g = Generator(fp)
+        g = Generator(fp,mangle_from_=unixfrom)
         g.flatten(self, unixfrom=unixfrom)
         return fp.getvalue()

----------
title: convenient Message.as_string to use mangle_from_=unixfrom ? -> Message.as_string should  use "mangle_from_=unixfrom"?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1459867>
_______________________________________


More information about the Python-bugs-list mailing list