[New-bugs-announce] [issue10901] Python 3 MIME generator dies if not given boundary

Brandon Craig Rhodes report at bugs.python.org
Thu Jan 13 18:22:25 CET 2011

New submission from Brandon Craig Rhodes <brandon at rhodesmill.org>:

If you try doing "msg.as_string()" to a MIMEMultipart message that has not been given a boundary, then it dies with this exception:

Traceback (most recent call last):
  File "mime_gen_alt.py", line 40, in <module>
  File "/home/brandon/python3.2b2/lib/python3.2/email/message.py", line 164, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/brandon/python3.2b2/lib/python3.2/email/generator.py", line 88, in flatten
  File "/home/brandon/python3.2b2/lib/python3.2/email/generator.py", line 134, in _write
  File "/home/brandon/python3.2b2/lib/python3.2/email/generator.py", line 160, in _dispatch
  File "/home/brandon/python3.2b2/lib/python3.2/email/generator.py", line 234, in _handle_multipart
    self.write('--' + boundary + self._NL)
TypeError: Can't convert 'NoneType' object to str implicitly

components: Library (Lib)
messages: 126187
nosy: brandon-rhodes
priority: normal
severity: normal
status: open
title: Python 3 MIME generator dies if not given boundary
type: crash
versions: Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list