Skip to content

Work around exception in EmailMessage().set_content('').

Mark Sapiro requested to merge msapiro/django-mailman3:fix_scrub into master

https://bugs.python.org/issue40597 has a fix committed for Python 3.8 and 3.9 which (inadvertently I hope) throws a ValueError when attempting to set the content of a message part to the null string. I have submitted a PR to fix the fix to allow setting content to a null string as in the past, but I don't know if or when this will be accepted. In the mean time, django_mailman3/lib/scrub.py has part.set_content('') in three places. These can be changed to part.set_content('\n') with no change in the result to avoid the ValueError

Merge request reports