summaryrefslogtreecommitdiff
path: root/Lib/email
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2016-09-07 13:41:06 -0400
committerR David Murray <rdmurray@bitdance.com>2016-09-07 13:41:06 -0400
commit91afe7ec9fc82328bc17ab6d7312489dffac2223 (patch)
treef69054645f6be23b685d9c4b2e535d5bdd5625be /Lib/email
parent5223f08e78efcfadb7fe2288fd48bb985d6ca7a7 (diff)
parentc2e2473bc210ff83c2cbc73c4b916893f773b480 (diff)
downloadcpython-git-91afe7ec9fc82328bc17ab6d7312489dffac2223.tar.gz
Merge: 27988: Make sure iter_attachments does not mutate the payload list.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/message.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/email/message.py b/Lib/email/message.py
index 65bb237752..4b042836ad 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