>>>>> "NWC" == NOW Website Coordinator <[EMAIL PROTECTED]> writes:

    NWC> I upgraded to the very latest release of 2.1 and I still
    NWC> can't get sync_members to work.

Dumb bugs on my part.  Here's a patch.
-Barry

Index: sync_members
===================================================================
RCS file: /cvsroot/mailman/mailman/bin/sync_members,v
retrieving revision 2.12
diff -u -r2.12 sync_members
--- sync_members        2 Dec 2002 14:45:53 -0000       2.12
+++ sync_members        3 Jan 2003 03:55:24 -0000
@@ -244,6 +244,7 @@
             print _('Nothing to do.')
             sys.exit(0)
 
+        enc = sys.getdefaultencoding()
         # addrs contains now all the addresses that need removing
         for laddr, (name, addr) in needsadding.items():
             pw = Utils.MakeRandomPassword()
@@ -262,6 +263,7 @@
 
         for laddr, addr in addrs.items():
             # Should be a member, otherwise our test above is broken
+            name = mlist.getMemberName(laddr) or ''
             if not dryrun:
                 try:
                     mlist.ApprovedDeleteMember(addr, admin_notif=notifyadmin,
@@ -272,8 +274,6 @@
                     # reasons is in the database.  Use a lower level remove to
                     # get rid of this member's entry
                     mlist.removeMember(addr)
-            name = mlist.getMemberName(laddr) or ''
-            enc = sys.getdefaultencoding()
             s = email.Utils.formataddr((name, addr)).encode(enc, 'replace')
             print _('Removed: %(s)s')
 

------------------------------------------------------
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

This message was sent to: archive@jab.org
Unsubscribe or change your options at
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to