aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2008-01-25 10:18:55 -0500
committerBarry Warsaw <barry@python.org>2008-01-25 10:18:55 -0500
commitdd5d5aaf4f49d446f31d63e74938bff414610cb5 (patch)
treeeedc22aead6bb690c97a52cb79add81587efdaf2
parent728b448fae8dc5201e46a47d788e5d410cc78249 (diff)
parentb9f58cac3640ef039f221263a3827e9c1751d9fe (diff)
downloadmailman2-dd5d5aaf4f49d446f31d63e74938bff414610cb5.tar.gz
mailman2-dd5d5aaf4f49d446f31d63e74938bff414610cb5.tar.xz
mailman2-dd5d5aaf4f49d446f31d63e74938bff414610cb5.zip
Merge trunk's Decorate patch.
-rw-r--r--Mailman/Handlers/Decorate.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Mailman/Handlers/Decorate.py b/Mailman/Handlers/Decorate.py
index 4c00e34d..65037fbb 100644
--- a/Mailman/Handlers/Decorate.py
+++ b/Mailman/Handlers/Decorate.py
@@ -65,6 +65,7 @@ def process(mlist, msg, msgdata):
except Errors.NotAMemberError:
pass
# These strings are descriptive for the log file and shouldn't be i18n'd
+ d.update(msgdata.get('decoration-data', {}))
header = decorate(mlist, mlist.msg_header, 'non-digest header', d)
footer = decorate(mlist, mlist.msg_footer, 'non-digest footer', d)
# Escape hatch if both the footer and header are empty
@@ -193,7 +194,7 @@ def process(mlist, msg, msgdata):
-def decorate(mlist, template, what, extradict={}):
+def decorate(mlist, template, what, extradict=None):
# `what' is just a descriptive phrase used in the log message
#
# BAW: We've found too many situations where Python can be fooled into
@@ -213,7 +214,8 @@ def decorate(mlist, template, what, extradict={}):
'info' : mlist.info,
'cgiext' : mm_cfg.CGIEXT,
})
- d.update(extradict)
+ if extradict is not None:
+ d.update(extradict)
# Using $-strings?
if getattr(mlist, 'use_dollar_strings', 0):
template = Utils.to_percent(template)