diff options
author | Abhilash Raj <maxking@users.noreply.github.com> | 2019-06-25 18:40:41 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-25 18:40:41 (GMT) |
commit | 01b23948038d35b119cededd149110231ecce00d (patch) | |
tree | c65f3a0c18a25893c3df9130d5164fd8dbee4ae9 /Python/sysmodule.c | |
parent | 2a99fd911ebeecedbb250a05667cd46eca4735b9 (diff) | |
download | cpython-01b23948038d35b119cededd149110231ecce00d.zip cpython-01b23948038d35b119cededd149110231ecce00d.tar.gz cpython-01b23948038d35b119cededd149110231ecce00d.tar.bz2 |
[3.7] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError. (GH-14119) (GH-14381)
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/sysmodule.c')
0 files changed, 0 insertions, 0 deletions