diff options
| author | bwarsaw | 2003-01-03 03:57:34 +0000 |
|---|---|---|
| committer | bwarsaw | 2003-01-03 03:57:34 +0000 |
| commit | e75eef27b0e473fe22d2c2a32d90f2e7396a4258 (patch) | |
| tree | 99505689fc3c74654570d7f2d66bc83c711995ae | |
| parent | f403b9345131bac74351428ed34658bf51f4daa2 (diff) | |
| download | mailman-e75eef27b0e473fe22d2c2a32d90f2e7396a4258.tar.gz mailman-e75eef27b0e473fe22d2c2a32d90f2e7396a4258.tar.zst mailman-e75eef27b0e473fe22d2c2a32d90f2e7396a4258.zip | |
main(): Fix some dumb coding bugs.
| -rwxr-xr-x | bin/sync_members | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/sync_members b/bin/sync_members index 1bf9a4549..0fefd07a9 100755 --- a/bin/sync_members +++ b/bin/sync_members @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2003 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -244,6 +244,7 @@ def main(): 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 @@ def main(): 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 @@ def main(): # 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') |
