------------------------------------------------------------
revno: 1645
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.1
timestamp: Wed 2016-04-20 20:14:20 -0700
message:
  Remove (incorrect) re.sub in favor of str.replace.
modified:
  Mailman/Handlers/Hold.py


--
lp:mailman/2.1
https://code.launchpad.net/~mailman-coders/mailman/2.1

Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Handlers/Hold.py'
--- Mailman/Handlers/Hold.py	2016-04-19 22:53:54 +0000
+++ Mailman/Handlers/Hold.py	2016-04-21 03:14:20 +0000
@@ -28,7 +28,6 @@
 message handling should stop.
 """
 
-import re
 import email
 from email.MIMEText import MIMEText
 from email.MIMEMessage import MIMEMessage
@@ -222,11 +221,9 @@
     # 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)

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to