R. David Murray <rdmur...@bitdance.com> added the comment: The problem only arises with HeaderParser. The full parser turns the body into a list containing a Message object, because that's how the email package models the message structure. HeaderParser treats the body as a single string. All that is fine, but generator's flatten method has special handlers for certain mime types, and message/rfc822 is one of them. It is looking for what it "knows" the message/rfc822 body looks like (a list containing a Message), but what it finds is a string.
The fix is probably to special case get_payload returning a string inside the _handle_message. I've attached a patch that adds your test file as a unit test and provides that fix. ---------- assignee: -> r.david.murray nosy: +r.david.murray priority: -> normal stage: -> patch review _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7970> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com