summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-10-19 04:06:39 (GMT)
committerBarry Warsaw <barry@python.org>2001-10-19 04:06:39 (GMT)
commit856c32b5f4a0fb40b0d94db405bdd653001e8d3e (patch)
tree6b408d40aa5901a2226b81e6779c23d8092d28fa /Lib/email
parentcb4414366ba2c94ac7e402b2e04d5ea9bc441474 (diff)
downloadcpython-856c32b5f4a0fb40b0d94db405bdd653001e8d3e.zip
cpython-856c32b5f4a0fb40b0d94db405bdd653001e8d3e.tar.gz
cpython-856c32b5f4a0fb40b0d94db405bdd653001e8d3e.tar.bz2
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.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/Generator.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/email/Generator.py b/Lib/email/Generator.py
index 12b9fdf..e969d00 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):