[Python-checkins] python/dist/src/Lib/email MIMEMultipart.py,1.1,1.2

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Mon, 08 Jul 2002 19:44:28 -0700


Update of /cvsroot/python/python/dist/src/Lib/email
In directory usw-pr-cvs1:/tmp/cvs-serv13493/email

Modified Files:
	MIMEMultipart.py 
Log Message:
__init__(): Don't attach the subparts if its an empty tuple.  If the
boundary was given in the arguments, call set_boundary().


Index: MIMEMultipart.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/MIMEMultipart.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** MIMEMultipart.py	1 Jun 2002 05:59:12 -0000	1.1
--- MIMEMultipart.py	9 Jul 2002 02:44:26 -0000	1.2
***************
*** 31,34 ****
          keyword arguments (or passed into the _params argument).
          """
!         MIMEBase.MIMEBase.__init__(self, 'multipart', _subtype, **params)
!         self.attach(*list(_subparts))
--- 31,37 ----
          keyword arguments (or passed into the _params argument).
          """
!         MIMEBase.MIMEBase.__init__(self, 'multipart', _subtype, **_params)
!         if _subparts:
!             self.attach(*list(_subparts))
!         if boundary:
!             self.set_boundary(boundary)