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/disabled.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/disabled.py')
| -rw-r--r-- | Mailman/bin/disabled.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Mailman/bin/disabled.py b/Mailman/bin/disabled.py index cc9205c19..4b82b8126 100644 --- a/Mailman/bin/disabled.py +++ b/Mailman/bin/disabled.py @@ -24,9 +24,10 @@ from Mailman import MailList from Mailman import MemberAdaptor from Mailman import Pending from Mailman import Utils +from Mailman import Version from Mailman import loginit -from Mailman import mm_cfg from Mailman.Bouncer import _BounceInfo +from Mailman.configuration import config from Mailman.i18n import _ __i18n_templates__ = True @@ -35,10 +36,6 @@ __i18n_templates__ = True import signal signal.signal(signal.SIGCHLD, signal.SIG_DFL) -loginit.initialize(propagate=True) -elog = logging.getLogger('mailman.error') -blog = logging.getLogger('mailman.bounce') - ALL = (MemberAdaptor.BYBOUNCE, MemberAdaptor.BYADMIN, MemberAdaptor.BYUSER, @@ -62,7 +59,7 @@ def who_callback(option, opt, value, parser): def parseargs(): - parser = optparse.OptionParser(version=mm_cfg.MAILMAN_VERSION, + parser = optparse.OptionParser(version=Version.MAILMAN_VERSION, usage=_("""\ %prog [options] @@ -110,6 +107,8 @@ notification yet.""")) dest='listnames', action='append', default=[], type='string', help=_("""\ Process only the given list, otherwise do all lists.""")) + parser.add_option('-C', '--config', + help=_('Alternative configuration file to use')) opts, args = parser.parse_args() return opts, args, parser @@ -117,6 +116,11 @@ Process only the given list, otherwise do all lists.""")) def main(): opts, args, parser = parseargs() + config.load(opts.config) + + loginit.initialize(propagate=True) + elog = logging.getLogger('mailman.error') + blog = logging.getLogger('mailman.bounce') listnames = set(opts.listnames or Utils.list_names()) who = tuple(opts.who) |
