[Mailman-Users] sync_members traceback errors still there -- anyone using it successfully?

Barry A. Warsaw barry at python.org
Fri Jan 3 04:58:27 CET 2003


>>>>> "NWC" == NOW Website Coordinator <webperson at now.org> 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')
 



More information about the Mailman-Users mailing list