New submission from R. David Murray: >>> m = message_from_string("Content-Disposition: attachment; >>> filename*0*="can't decode this filename") >>> m.get_filename() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/rdmurray/python/p32/Lib/email/message.py", line 752, in get_filename return utils.collapse_rfc2231_value(filename).strip() File "/home/rdmurray/python/p32/Lib/email/utils.py", line 303, in collapse_rfc2231_value return str(rawbytes, charset, errors) TypeError: str() argument 2 must be str, not None
---------- keywords: easy messages: 183619 nosy: r.david.murray priority: normal severity: normal stage: needs patch status: open title: Message.get_filename produces exception if the RFC2231 encoding is ill-formed type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17369> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com