aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2016-04-20 20:14:20 -0700
committerMark Sapiro <mark@msapiro.net>2016-04-20 20:14:20 -0700
commit97557e37b4436ea4bf09ef618e6105951266b838 (patch)
treed5406ee6232694826ef6a28447f144aa11297e75 /Mailman
parenta70edc26ac027f6278a38bbe10c921b962adbf7a (diff)
downloadmailman2-97557e37b4436ea4bf09ef618e6105951266b838.tar.gz
mailman2-97557e37b4436ea4bf09ef618e6105951266b838.tar.xz
mailman2-97557e37b4436ea4bf09ef618e6105951266b838.zip
Remove (incorrect) re.sub in favor of str.replace.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Hold.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py
index dcc7f963..2faebae1 100644
--- a/Mailman/Handlers/Hold.py
+++ b/Mailman/Handlers/Hold.py
@@ -28,7 +28,6 @@ Finally an exception is raised to let the pipeline machinery know that further
message handling should stop.
"""
-import re
import email
from email.MIMEText import MIMEText
from email.MIMEMessage import MIMEMessage
@@ -222,11 +221,9 @@ def hold_for_approval(mlist, msg, msgdata, exc):
# translator again, because of the games we play above
reason = Utils.wrap(exc.reason_notice())
if isinstance(exc, NonMemberPost) and mlist.nonmember_rejection_notice:
- msgdata['rejection_notice'] = Utils.wrap(re.sub(
- '%(listowner)s',
- mlist.GetOwnerEmail(),
- mlist.nonmember_rejection_notice,
- ))
+ msgdata['rejection_notice'] = Utils.wrap(
+ mlist.nonmember_rejection_notice.replace(
+ '%(listowner)s', owneraddr))
else:
msgdata['rejection_notice'] = Utils.wrap(exc.rejection_notice(mlist))
id = mlist.HoldMessage(msg, reason, msgdata)