Commit bb493a70 authored by Barry Warsaw's avatar Barry Warsaw

__init__(): Don't attach the subparts if its an empty tuple. If the

boundary was given in the arguments, call set_boundary().
parent 93c40f0c
......@@ -30,5 +30,8 @@ class MIMEMultipart(MIMEBase.MIMEBase):
Additional parameters for the Content-Type: header are taken from the
keyword arguments (or passed into the _params argument).
"""
MIMEBase.MIMEBase.__init__(self, 'multipart', _subtype, **params)
self.attach(*list(_subparts))
MIMEBase.MIMEBase.__init__(self, 'multipart', _subtype, **_params)
if _subparts:
self.attach(*list(_subparts))
if boundary:
self.set_boundary(boundary)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment