[3.8] bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError (GH-14119) by maxking · Pull Request #14380 · python/cpython
…rror. (pythonGH-14119) * bpo-33972: Fix EmailMessage.iter_attachments raising AttributeError. 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 0225701) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters