__init__(): Don't attach the subparts if its an empty tuple. If the
boundary was given in the arguments, call set_boundary().
This commit is contained in:
parent
93c40f0c3a
commit
bb493a7039
|
@ -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)
|
||||
MIMEBase.MIMEBase.__init__(self, 'multipart', _subtype, **_params)
|
||||
if _subparts:
|
||||
self.attach(*list(_subparts))
|
||||
if boundary:
|
||||
self.set_boundary(boundary)
|
||||
|
|
Loading…
Reference in New Issue