diff options
| author | bwarsaw | 1999-03-25 23:19:23 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-03-25 23:19:23 +0000 |
| commit | c1ec281c2fb6508c872b81d7107dc15da17b827e (patch) | |
| tree | 7f973103afb90628c0317f96507083c8fe61b708 | |
| parent | b54b6253e2b9818c3a69c058240005b85c470575 (diff) | |
| download | mailman-c1ec281c2fb6508c872b81d7107dc15da17b827e.tar.gz mailman-c1ec281c2fb6508c872b81d7107dc15da17b827e.tar.zst mailman-c1ec281c2fb6508c872b81d7107dc15da17b827e.zip | |
main(): Ignore any line that is empty (all whitespace) or is a comment
(first non-whitespace is a #).
Diffstat (limited to '')
| -rwxr-xr-x | bin/sync_members | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/sync_members b/bin/sync_members index 66652672b..47ef8ea2f 100755 --- a/bin/sync_members +++ b/bin/sync_members @@ -161,6 +161,14 @@ def main(): filemembers = fp.readlines() fp.close() + # strip out lines we don't care about, they are comments (# in first + # non-whitespace) or are blank + for i in range(len(filemembers)-1, -1, -1): + addr = string.strip(filemembers[i]) + if addr == '' or addr[:1] == '#': + del filemembers[i] + print 'Ignore : %30s' % addr + # first filter out any invalid addresses filemembers = Mailman.Utils.ParseAddrs(filemembers) invalid = 0 |
