Skip to content

Conversation

@maxking
Copy link
Contributor

@maxking maxking commented Jun 25, 2019

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 [email protected]

https://bugs.python.org/issue33972

…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 <[email protected]>
@maxking maxking requested a review from a team as a code owner June 25, 2019 18:21
@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label Jun 25, 2019
@miss-islington
Copy link
Contributor

@maxking: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 01b2394 into python:3.7 Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants