New submission from Xavier Hausherr <xav...@shipfix.com>:

Following this issue: https://bugs.python.org/issue33972

Same bug apply to email.message.get_body() with attached email example and the 
following code: 

        from email.policy import default
        import email

        with open('email_bad_formatted.eml', 'rb') as fp:
            msg = email.message_from_binary_file(fp, policy=default)
        body = msg.get_body()

> Result:
E       AttributeError: 'str' object has no attribute 'is_attachment'

/usr/local/lib/python3.9/email/message.py:978: AttributeError

----------
components: email
files: email_bad_formatted.eml
messages: 384847
nosy: barry, iritkatriel, r.david.murray, xavier2
priority: normal
severity: normal
status: open
title: AttributeError in email.message.get_body()
versions: Python 3.9
Added file: https://bugs.python.org/file49734/email_bad_formatted.eml

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42892>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to