diff options
| author | bwarsaw | 2000-04-21 20:49:03 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-04-21 20:49:03 +0000 |
| commit | 1a16b9ba0ac3b25f728fdce97bfe6be286e0308e (patch) | |
| tree | 07326dd84eb9870e7e9f66a3dbebea1a2f8346f1 | |
| parent | 53a3d0ab31a026bf424e918ccbd6fa9ea26fe5d5 (diff) | |
| download | mailman-1a16b9ba0ac3b25f728fdce97bfe6be286e0308e.tar.gz mailman-1a16b9ba0ac3b25f728fdce97bfe6be286e0308e.tar.zst mailman-1a16b9ba0ac3b25f728fdce97bfe6be286e0308e.zip | |
| -rwxr-xr-x | bin/clone_member | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/bin/clone_member b/bin/clone_member index 70ae83e3b..1a92cc606 100755 --- a/bin/clone_member +++ b/bin/clone_member @@ -47,7 +47,7 @@ Where: Scan the list admin addresses for the old address, and clone or change them too. - --quite + --quiet -q Do the modifications quietly. @@ -89,19 +89,31 @@ def dolist(mlist, options): print 'processing mailing list:', mlist.internal_name() # scan the list owners. TBD: mlist.owner keys should be lowercase? + oldowners = mlist.owner + oldowners.sort() if options.admintoo: if not options.quiet: - print ' scanning list owners:', string.join(mlist.owner, ' ') + print ' scanning list owners:', string.join(oldowners, ' '), newowners = {} for owner in mlist.owner: - if options.remove and options.lfromaddr == string.lower(owner): - continue - newowners[owner] = 1 - newowners[options.toaddr] = 1 + foundp = 0 + if options.lfromaddr == string.lower(owner): + foundp = 1 + if options.remove: + continue + newowners[owner] = 1 + if foundp: + newowners[options.toaddr] = 1 + newowners = newowners.keys() + newowners.sort() if options.modify: - mlist.owner = newowners.keys() + mlist.owner = newowners if not options.quiet: - print ' new list owners:', string.join(newowners.keys(), ' ') + if newowners <> oldowners: + print + print ' new list owners:', string.join(newowners, ' ') + else: + print '(no change)' # see if the fromaddr is a digest member or regular member if options.lfromaddr in mlist.GetDigestMembers(): |
