aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Decorate.py
diff options
context:
space:
mode:
authorYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2017-04-26 14:33:19 +0900
committerYasuhito FUTATSUKI at POEM <futatuki@poem.co.jp>2017-04-26 14:33:19 +0900
commit588da6057bfe19df9ef7d8667da41fc9888c7bd9 (patch)
treedfd1cb72b8761cc43ffb49be6129d85fcb0aef0a /Mailman/Handlers/Decorate.py
parent2ad1a49e7210ef6cd1f1752508da571c08abe763 (diff)
parent4657d9ae7b6c0b696ae2557a89469ac7f29c9289 (diff)
downloadmailman2-588da6057bfe19df9ef7d8667da41fc9888c7bd9.tar.gz
mailman2-588da6057bfe19df9ef7d8667da41fc9888c7bd9.tar.xz
mailman2-588da6057bfe19df9ef7d8667da41fc9888c7bd9.zip
merge lp:mailman/2.1 up to rev 1699
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Decorate.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py
index de8b44e6..d1c8c5b4 100644
--- a/Mailman/Handlers/Decorate.py
+++ b/Mailman/Handlers/Decorate.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2008 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2017 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -210,7 +210,11 @@ def process(mlist, msg, msgdata):
def decorate(mlist, template, what, extradict=None):
# `what' is just a descriptive phrase used in the log message
- #
+
+ # If template is only whitespace, ignore it.
+ if len(re.sub('\s', '', template)) == 0:
+ return ''
+
# BAW: We've found too many situations where Python can be fooled into
# interpolating too much revealing data into a format string. For
# example, a footer of "% silly %(real_name)s" would give a header