diff options
| author | bwarsaw | 1999-05-03 23:02:09 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-05-03 23:02:09 +0000 |
| commit | 1e6ce6fe639d29ab680733050744fd44db2fc382 (patch) | |
| tree | f3a4f099a4afbddd69a4b0ff2edc53c4eed95a7f | |
| parent | e3a961ba52c556a8bd458f46a179f049de095023 (diff) | |
| download | mailman-1e6ce6fe639d29ab680733050744fd44db2fc382.tar.gz mailman-1e6ce6fe639d29ab680733050744fd44db2fc382.tar.zst mailman-1e6ce6fe639d29ab680733050744fd44db2fc382.zip | |
| -rwxr-xr-x | bin/sync_members | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/sync_members b/bin/sync_members index 1f53c9e40..e6e774ee0 100755 --- a/bin/sync_members +++ b/bin/sync_members @@ -228,21 +228,26 @@ def main(): # addrs contains now all the addresses that need removing for laddr, addr in needsadding.items(): - print 'Adding : %30s (%30s)' % (laddr, addr) if dryrun: continue pw = '%s%s' % (Mailman.Utils.GetRandomSeed(), Mailman.Utils.GetRandomSeed()) # should not already be subscribed, otherwise our test above is - # broken - mlist.ApprovedAddMember(addr, pw, digest, welcome, notifyadmin) + # broken. Bogosity is if the address is listed in the file more + # than once. Second and subsequent ones trigger an + # MMAlreadyAMember error. Just catch it and go on. + try: + mlist.ApprovedAddMember(addr, pw, digest, welcome, notifyadmin) + print 'Added : %30s (%30s)' % (laddr, addr) + except Mailman.Errors.MMAlreadyAMember: + pass for laddr, addr in addrs.items(): - print 'Removing: %30s (%30s)' % (laddr, addr) if dryrun: continue # should be a member, otherwise our test above is broken mlist.DeleteMember(addr, admin_notif=notifyadmin) + print 'Removed: %30s (%30s)' % (laddr, addr) mlist.Save() finally: |
