[issue41585] policy.max_line_length is incorrectly assumed to never be None

Erik Quaeghebeur report at bugs.python.org
Thu Aug 20 04:11:18 EDT 2020


Erik Quaeghebeur <python at equaeghe.nospammail.net> added the comment:

The script that triggered the issue can be found at

https://github.com/equaeghe/mailfilters/blob/master/html2alternative.py

You'll have to remove ", cte='8bit'" on line 68 to expose the bug (that was added as a workaround for this bug).

I was consistently able to trigger the bug when applying it to a mail with a multipart/alternative with text and html parts already present. It should replace that html part by a (nested) multipart/alternative part, but it crashes unless you keep the workaround.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41585>
_______________________________________


More information about the Python-bugs-list mailing list