summaryrefslogtreecommitdiffstats
path: root/Lib/email/mime
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email/mime')
-rw-r--r--Lib/email/mime/multipart.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/email/mime/multipart.py b/Lib/email/mime/multipart.py
index 5c8c9db..9661865 100644
--- a/Lib/email/mime/multipart.py
+++ b/Lib/email/mime/multipart.py
@@ -34,6 +34,12 @@ class MIMEMultipart(MIMEBase):
keyword arguments (or passed into the _params argument).
"""
MIMEBase.__init__(self, 'multipart', _subtype, **_params)
+
+ # Initialise _payload to an empty list as the Message superclass's
+ # implementation of is_multipart assumes that _payload is a list for
+ # multipart messages.
+ self._payload = []
+
if _subparts:
for p in _subparts:
self.attach(p)