aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Decorate.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2017-03-04 13:21:54 -0800
committerMark Sapiro <mark@msapiro.net>2017-03-04 13:21:54 -0800
commit2c34348878f40b9a0fe9784baf89d02cb3dac252 (patch)
tree925112e587424302416a722c2c6f22ad34c011a1 /Mailman/Handlers/Decorate.py
parentb3b302042d527deeeb87605ad22e7185d0beae20 (diff)
downloadmailman2-2c34348878f40b9a0fe9784baf89d02cb3dac252.tar.gz
mailman2-2c34348878f40b9a0fe9784baf89d02cb3dac252.tar.xz
mailman2-2c34348878f40b9a0fe9784baf89d02cb3dac252.zip
Ensure added headers and footers have a trailing new-line.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Decorate.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py
index 69e86d5b..de8b44e6 100644
--- a/Mailman/Handlers/Decorate.py
+++ b/Mailman/Handlers/Decorate.py
@@ -240,4 +240,7 @@ def decorate(mlist, template, what, extradict=None):
except (ValueError, TypeError), e:
syslog('error', 'Exception while calculating %s:\n%s', what, e)
text = template
+ # Ensure text ends with new-line
+ if not text.endswith('\n'):
+ text += '\n'
return text