diff options
author | R David Murray <rdmurray@bitdance.com> | 2016-09-07 17:39:36 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2016-09-07 17:39:36 (GMT) |
commit | c2e2473bc210ff83c2cbc73c4b916893f773b480 (patch) | |
tree | 7d773f8dc337bc685924c6a99c1703692ce47f11 /Lib/email | |
parent | 48c88307d87ae0704885b9b5c692ded861077a71 (diff) | |
download | cpython-c2e2473bc210ff83c2cbc73c4b916893f773b480.zip cpython-c2e2473bc210ff83c2cbc73c4b916893f773b480.tar.gz cpython-c2e2473bc210ff83c2cbc73c4b916893f773b480.tar.bz2 |
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 aefaf57..6cd6cb7 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 |