diff options
author | Abhilash Raj <maxking@users.noreply.github.com> | 2019-06-25 18:38:48 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-25 18:38:48 (GMT) |
commit | c6e32824cf038386174fe2b9e7273e4779c9958c (patch) | |
tree | 774d213907208a4a04250917db985f493af195df /Python/pythonrun.c | |
parent | 12d174bed9960ded1d072035c57f82e10a89f0d6 (diff) | |
download | cpython-c6e32824cf038386174fe2b9e7273e4779c9958c.zip cpython-c6e32824cf038386174fe2b9e7273e4779c9958c.tar.gz cpython-c6e32824cf038386174fe2b9e7273e4779c9958c.tar.bz2 |
[3.8] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError (GH-14119) (GH-14380)
When certain malformed messages have content-type set to 'mulitpart/*' but
still have a single part body, iter_attachments can raise AttributeError. This
patch fixes it by returning a None value instead when the body is single part.
(cherry picked from commit 02257012f6d3821d816cb6a7e8461a88a05b9a08)
Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
https://bugs.python.org/issue33972
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions