------------------------------------------------------------
revno: 1170
committer: Mark Sapiro <msap...@value.net>
branch nick: 2.2
timestamp: Thu 2011-05-05 13:11:50 -0700
message:
  Report case-preserved old address in change log message and admin notice.
modified:
  Mailman/MailList.py


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

Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/MailList.py'
--- Mailman/MailList.py	2011-02-07 20:01:02 +0000
+++ Mailman/MailList.py	2011-05-05 20:11:50 +0000
@@ -1149,13 +1149,14 @@
         # CP address of a member, then if the old address yields a different
         # CP address, we can simply remove the old address, otherwise we can
         # do nothing.
+        cpoldaddr = self.getMemberCPAddress(oldaddr)
         if self.isMember(newaddr) and (self.getMemberCPAddress(newaddr) ==
                 newaddr):
-            if self.getMemberCPAddress(oldaddr) <> newaddr:
+            if cpoldaddr <> newaddr:
                 self.removeMember(oldaddr)
         else:
             self.changeMemberAddress(oldaddr, newaddr)
-            self.log_and_notify_admin(oldaddr, newaddr)
+            self.log_and_notify_admin(cpoldaddr, newaddr)
         # If globally is true, then we also include every list for which
         # oldaddr is a member.
         if not globally:
@@ -1175,13 +1176,14 @@
             mlist.Lock()
             try:
                 # Same logic as above, re newaddr is already a member
+                cpoldaddr = mlist.getMemberCPAddress(oldaddr)
                 if mlist.isMember(newaddr) and (
                         mlist.getMemberCPAddress(newaddr) == newaddr):
-                    if mlist.getMemberCPAddress(oldaddr) <> newaddr:
+                    if cpoldaddr <> newaddr:
                         mlist.removeMember(oldaddr)
                 else:
                     mlist.changeMemberAddress(oldaddr, newaddr)
-                    mlist.log_and_notify_admin(oldaddr, newaddr)
+                    mlist.log_and_notify_admin(cpoldaddr, newaddr)
                 mlist.Save()
             finally:
                 mlist.Unlock()

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

Reply via email to