]> granicus.if.org Git - python/commitdiff
__init__(): Minor code cleanup.
authorBarry Warsaw <barry@python.org>
Sat, 28 Sep 2002 20:27:28 +0000 (20:27 +0000)
committerBarry Warsaw <barry@python.org>
Sat, 28 Sep 2002 20:27:28 +0000 (20:27 +0000)
Lib/email/MIMEText.py

index 048f544f6cd188b6abcd8b9781a25e72fb06001a..ccc82da9e43af93dc4ea06734641821fdae2409a 100644 (file)
@@ -35,7 +35,7 @@ class MIMEText(MIMENonMultipart):
         """
         MIMENonMultipart.__init__(self, 'text', _subtype,
                                   **{'charset': _charset})
-        if _text and _text[-1] <> '\n':
+        if _text and not _text.endswith('\n'):
             _text += '\n'
         self.set_payload(_text, _charset)
         if _encoder is not None: