summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas@biessmann.de>2013-11-19 15:44:02 +0100
committerJeremy Kerr <jk@ozlabs.org>2014-07-24 17:14:21 +0800
commit0a502d0cf5b0daced5869130b1003d2002d547ab (patch)
treedaccf04a342c536028eb53854eb36fddfc8f9401
parent9cc7b245a9364893c96178a0dd987a62f96b5b41 (diff)
downloadpatchwork-0a502d0cf5b0daced5869130b1003d2002d547ab.tar.bz2
patchwork-0a502d0cf5b0daced5869130b1003d2002d547ab.tar.xz
views: fix patch_to_mbox() for postscript
Before we changed the comment 'some comment\n---\n some/file | 1 +' to 'some comment\n\n---\nsome/file | 1 +\n'. Now we pass this comment unchanged. Signed-off-by: Andreas Bießmann <andreas@biessmann.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r--apps/patchwork/views/__init__.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/patchwork/views/__init__.py b/apps/patchwork/views/__init__.py
index 9d1d144..dfca56d 100644
--- a/apps/patchwork/views/__init__.py
+++ b/apps/patchwork/views/__init__.py
@@ -181,7 +181,7 @@ def patch_to_mbox(patch):
if len(parts) == 2:
(body, postscript) = parts
body = body.strip() + "\n"
- postscript = postscript.strip() + "\n"
+ postscript = postscript.rstrip()
else:
postscript = ''
@@ -189,11 +189,8 @@ def patch_to_mbox(patch):
.exclude(msgid = patch.msgid):
body += comment.patch_responses()
- if body:
- body += '\n'
-
if postscript:
- body += '---\n' + postscript.strip() + '\n'
+ body += '---\n' + postscript + '\n'
if patch.content:
body += '\n' + patch.content