New submission from Brandon Craig Rhodes <[email protected]>:
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>
print(msg.as_string())
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
self._write(msg)
File "/home/brandon/python3.2b2/lib/python3.2/email/generator.py", line 134,
in _write
self._dispatch(msg)
File "/home/brandon/python3.2b2/lib/python3.2/email/generator.py", line 160,
in _dispatch
meth(msg)
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 <[email protected]>
<http://bugs.python.org/issue10901>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com