From: Barry Warsaw Date: Tue, 11 Mar 2003 05:04:09 +0000 (+0000) Subject: __init__(): Don't add a newline to _text if it doesn't already end in X-Git-Tag: v2.3c1~1486 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbec700b499a62125a0dd32ef272295cf49c1b8d;p=thirdparty%2FPython%2Fcpython.git __init__(): Don't add a newline to _text if it doesn't already end in one. Possibly controversial. --- diff --git a/Lib/email/MIMEText.py b/Lib/email/MIMEText.py index d91b93df3d18..d049ad9fd80b 100644 --- a/Lib/email/MIMEText.py +++ b/Lib/email/MIMEText.py @@ -17,8 +17,7 @@ class MIMEText(MIMENonMultipart): _encoder=None): """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. + _text is the string for this message object. _subtype is the MIME sub content type, defaulting to "plain". @@ -35,8 +34,6 @@ class MIMEText(MIMENonMultipart): """ 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: warnings.warn('_encoder argument is obsolete.',