This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author msapiro
Recipients barry, ivyl, miss-islington, msapiro, r.david.murray
Date 2020-05-30.17:38:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590860285.26.0.581297144744.issue40597@roundup.psfhosted.org>
In-reply-to
Content
With the fix in PR 20038, committed at https://github.com/python/cpython/commit/6f2f475d5a2cd7675dce844f3af436ba919ef92b it is no longer possible to set_content(''). Attempts to do so produce the following
```
  File "/var/MM/3/hk_39/hyperkitty/.tox/py39-django30/lib/python3.9/site-packages/django_mailman3/lib/scrub.py", line 95, in _get_all_attachments
    part.set_content('')
  File "/usr/local/lib/python3.9/email/message.py", line 1171, in set_content
    super().set_content(*args, **kw)
  File "/usr/local/lib/python3.9/email/message.py", line 1101, in set_content
    content_manager.set_content(self, *args, **kw)
  File "/usr/local/lib/python3.9/email/contentmanager.py", line 37, in set_content
    handler(msg, obj, *args, **kw)
  File "/usr/local/lib/python3.9/email/contentmanager.py", line 185, in set_text_content
    cte, payload = _encode_text(string, charset, cte, msg.policy)
  File "/usr/local/lib/python3.9/email/contentmanager.py", line 149, in _encode_text
    if max(len(x) for x in lines) <= policy.max_line_length:
ValueError: max() arg is an empty sequence
```
History
Date User Action Args
2020-05-30 17:38:05msapirosetrecipients: + msapiro, barry, r.david.murray, miss-islington, ivyl
2020-05-30 17:38:05msapirosetmessageid: <1590860285.26.0.581297144744.issue40597@roundup.psfhosted.org>
2020-05-30 17:38:05msapirolinkissue40597 messages
2020-05-30 17:38:05msapirocreate