From: Barry Warsaw Date: Fri, 19 Oct 2001 04:06:39 +0000 (+0000) Subject: Another merge from mimelib: X-Git-Tag: v2.2.1c1~1157 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=856c32b5f4a0fb40b0d94db405bdd653001e8d3e;p=thirdparty%2FPython%2Fcpython.git Another merge from mimelib: _handle_multipart(): If there is an epilogue and the epilogue does not itself start with a newline, add a newline before writing the epilogue. Closes SF bug #472481. --- diff --git a/Lib/email/Generator.py b/Lib/email/Generator.py index 12b9fdf74b91..e969d00d89ed 100644 --- a/Lib/email/Generator.py +++ b/Lib/email/Generator.py @@ -273,6 +273,8 @@ class Generator: print >> self._fp, '\n--' + boundary + '--', # Write out any epilogue if msg.epilogue is not None: + if not msg.epilogue.startswith('\n'): + print >> self._fp self._fp.write(msg.epilogue) def _handle_multipart_digest(self, msg):