diff options
author | R David Murray <rdmurray@bitdance.com> | 2016-09-07 17:41:06 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2016-09-07 17:41:06 (GMT) |
commit | 91afe7ec9fc82328bc17ab6d7312489dffac2223 (patch) | |
tree | f69054645f6be23b685d9c4b2e535d5bdd5625be /Lib/email | |
parent | 5223f08e78efcfadb7fe2288fd48bb985d6ca7a7 (diff) | |
parent | c2e2473bc210ff83c2cbc73c4b916893f773b480 (diff) | |
download | cpython-91afe7ec9fc82328bc17ab6d7312489dffac2223.zip cpython-91afe7ec9fc82328bc17ab6d7312489dffac2223.tar.gz cpython-91afe7ec9fc82328bc17ab6d7312489dffac2223.tar.bz2 |
Merge: 27988: Make sure iter_attachments does not mutate the payload list.
Diffstat (limited to 'Lib/email')
-rw-r--r-- | Lib/email/message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/message.py b/Lib/email/message.py index 65bb237..4b04283 100644 --- a/Lib/email/message.py +++ b/Lib/email/message.py @@ -1022,7 +1022,7 @@ class MIMEPart(Message): maintype, subtype = self.get_content_type().split('/') if maintype != 'multipart' or subtype == 'alternative': return - parts = self.get_payload() + parts = self.get_payload().copy() if maintype == 'multipart' and subtype == 'related': # For related, we treat everything but the root as an attachment. # The root may be indicated by 'start'; if there's no start or we |