Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment: David, it seems my patch http://bugs.python.org/file20675/email_header.patch is a real requirement for EMAIL 5.1 code.
This is because BytesGenerator._write_headers() creates a Header instance in 'else:' (the other branches are not entered at all for the test mail), passing 'v' as the 's=' arg of Header ctor. It follows that Header._chunks[] is never the empty list. 'v' however may be the empty string for header fields like 'X-Status:', 'X-Keywords:' and maybe more, resulting in string.splitlines() trying to break up the empty string. I don't understand why i could pass thousands of mails, including the test mail, dozens of times through my thing without showing this up? Does the mailbox.mbox message subclass adjust such things? Bye. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11401> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com