Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment:
So here is a patch which steps forward the not-yet-fully-completed
transition to the mixed bytes/str EMail stuff.
Test coverage is available if you patch in
http://bugs.python.org/file21549/11684.1.diff from #11684.
(Because i leak the great picture of this module ... say.)
----------
keywords: +patch
Added file: http://bugs.python.org/file21612/11782.1.diff
_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11782>
_______________________________________
diff --git a/Lib/email/generator.py b/Lib/email/generator.py
--- a/Lib/email/generator.py
+++ b/Lib/email/generator.py
@@ -297,10 +297,12 @@
# message/rfc822. Such messages are generated by, for example,
# Groupwise when forwarding unadorned messages. (Issue 7970.) So
# in that case we just emit the string body.
- payload = msg.get_payload()
+ payload = msg._payload
if isinstance(payload, list):
g.flatten(msg.get_payload(0), unixfrom=False, linesep=self._NL)
payload = s.getvalue()
+ else:
+ payload = self._encode(payload)
self._fp.write(payload)
# This used to be a module level function; we use a classmethod for this
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com