This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients charlesc, r.david.murray
Date 2010-02-20.04:32:20
SpamBayes Score 0.0009043088
Marked as misclassified No
Message-id <1266640343.25.0.192232689885.issue7970@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-02-20 04:32:23r.david.murraysetrecipients: + r.david.murray, charlesc
2010-02-20 04:32:23r.david.murraysetmessageid: <1266640343.25.0.192232689885.issue7970@psf.upfronthosting.co.za>
2010-02-20 04:32:22r.david.murraylinkissue7970 messages
2010-02-20 04:32:21r.david.murraycreate