diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2016-09-30 06:11:42 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2016-09-30 06:11:42 +0900 |
commit | eda2cc91d4e0332df8ee2ecae8aa9fdbc7e68809 (patch) | |
tree | c176ebc26d99e34b314610f3fec89b776dc9beb0 /cron | |
parent | 1dac81b59ef0e6eeff85ec8665a2be2dbab38d44 (diff) | |
parent | f436fcb0c2e73fcc0e52b609f8464999759ac261 (diff) | |
download | mailman2-eda2cc91d4e0332df8ee2ecae8aa9fdbc7e68809.tar.gz mailman2-eda2cc91d4e0332df8ee2ecae8aa9fdbc7e68809.tar.xz mailman2-eda2cc91d4e0332df8ee2ecae8aa9fdbc7e68809.zip |
Merge lp:mailman/2.1 rev 1677
Diffstat (limited to 'cron')
-rwxr-xr-x | cron/senddigests | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/cron/senddigests b/cron/senddigests index edf27a2a..9997096c 100755 --- a/cron/senddigests +++ b/cron/senddigests @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2016 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 @@ -28,7 +28,12 @@ Options: -l listname --listname=listname Send the digest for the given list only, otherwise the digests for all - lists are sent out. + lists are sent out. May be repeated to do multiple lists. + + -e listname + --exceptlist listname + Don't send the digest for the given list. May be repeated to skip + multiple lists. """ import os @@ -63,22 +68,31 @@ def usage(code, msg=''): def main(): try: - opts, args = getopt.getopt(sys.argv[1:], 'hl:', ['help', 'listname=']) + opts, args = getopt.getopt(sys.argv[1:], 'hl:e:', + ['help', 'listname=', 'exceptlist=']) except getopt.error, msg: usage(1, msg) if args: usage(1) + exceptlists = [] listnames = [] for opt, arg in opts: if opt in ('-h', '--help'): usage(0) elif opt in ('-l', '--listname'): listnames.append(arg) + elif opt in ('-e', '--exceptlist'): + exceptlists.append(arg) if not listnames: listnames = Utils.list_names() + for listname in exceptlists: + try: + listnames.remove(listname) + except ValueError: + pass for listname in listnames: mlist = MailList.MailList(listname, lock=0) |