[Python-checkins] python/dist/src/Lib/email MIMEText.py,1.7,1.8

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
2003年3月10日 21:04:11 -0800


Update of /cvsroot/python/python/dist/src/Lib/email
In directory sc8-pr-cvs1:/tmp/cvs-serv4392
Modified Files:
	MIMEText.py 
Log Message:
__init__(): Don't add a newline to _text if it doesn't already end in
one. Possibly controversial.
Index: MIMEText.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/MIMEText.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** MIMEText.py	1 Oct 2002 00:52:27 -0000	1.7
--- MIMEText.py	11 Mar 2003 05:04:09 -0000	1.8
***************
*** 18,23 ****
 """Create a text/* type MIME document.
 
! _text is the string for this message object. If the text does not end
! in a newline, one is added.
 
 _subtype is the MIME sub content type, defaulting to "plain".
--- 18,22 ----
 """Create a text/* type MIME document.
 
! _text is the string for this message object.
 
 _subtype is the MIME sub content type, defaulting to "plain".
***************
*** 36,41 ****
 MIMENonMultipart.__init__(self, 'text', _subtype,
 **{'charset': _charset})
- if _text and not _text.endswith('\n'):
- _text += '\n'
 self.set_payload(_text, _charset)
 if _encoder is not None:
--- 35,38 ----

AltStyle によって変換されたページ (->オリジナル) /