diff options
| author | msapiro | 2006-10-24 03:55:24 +0000 |
|---|---|---|
| committer | msapiro | 2006-10-24 03:55:24 +0000 |
| commit | 3256c431e7bf966d3de49e4dc31dd01d57ffb02f (patch) | |
| tree | e0f32257c2bc73eec34e4ebf2f50c27b0ff23a66 /Mailman/bin/senddigests.py | |
| parent | f0a263b63991efc787bfd870bd7a491c53dce54a (diff) | |
| download | mailman-3256c431e7bf966d3de49e4dc31dd01d57ffb02f.tar.gz mailman-3256c431e7bf966d3de49e4dc31dd01d57ffb02f.tar.zst mailman-3256c431e7bf966d3de49e4dc31dd01d57ffb02f.zip | |
Updated the mmshell scripts so all use the configuration.py config object
instead of mm_cfg.py. This involved mostly mechanical replacements, but
there were a few gotchas to make sure that various calls and assignments
that ultimately referenced the config were delayed until after the config
was loaded.
Updated configuration.py to throw an exception if config.load() is called
with a non-existent filename argument.
Updated loginit.py to add the fromusenet log used by gate_news.py.
Diffstat (limited to 'Mailman/bin/senddigests.py')
| -rw-r--r-- | Mailman/bin/senddigests.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Mailman/bin/senddigests.py b/Mailman/bin/senddigests.py index fa01d3666..febaf4162 100644 --- a/Mailman/bin/senddigests.py +++ b/Mailman/bin/senddigests.py @@ -20,7 +20,8 @@ import optparse from Mailman import MailList from Mailman import Utils -from Mailman import mm_cfg +from Mailman import Version +from Mailman.configuration import config from Mailman.i18n import _ # Work around known problems with some RedHat cron daemons @@ -32,7 +33,7 @@ __i18n_templates__ = True def parseargs(): - parser = optparse.OptionParser(version=mm_cfg.MAILMAN_VERSION, + parser = optparse.OptionParser(version=Version.MAILMAN_VERSION, usage=_("""\ %prog [options] @@ -43,6 +44,8 @@ set.""")) dest='listnames', help=_("""\ Send the digest for the given list only, otherwise the digests for all lists are sent out. Multiple -l options may be given.""")) + parser.add_option('-C', '--config', + help=_('Alternative configuration file to use')) opts, args = parser.parse_args() if args: parser.print_help() @@ -54,6 +57,7 @@ lists are sent out. Multiple -l options may be given.""")) def main(): opts, args, parser = parseargs() + config.load(opts.config) for listname in set(opts.listnames or Utils.list_names()): mlist = MailList.MailList(listname, lock=False) |
