]> granicus.if.org Git - python/commitdiff
Another merge from mimelib:
authorBarry Warsaw <barry@python.org>
Fri, 19 Oct 2001 04:06:39 +0000 (04:06 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 19 Oct 2001 04:06:39 +0000 (04:06 +0000)
    _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.

Lib/email/Generator.py

index 12b9fdf74b911df2ed0256b915af809710399332..e969d00d89ed19792f4ba48fe5ab1b3facb9e4dd 100644 (file)
@@ -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):