diff options
| author | bwarsaw | 2006-09-25 00:01:06 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-09-25 00:01:06 +0000 |
| commit | 8157935353a960cd03a72e403e8638b016c8e9a1 (patch) | |
| tree | 00e219530cab575a9d2ec76ee9c90523d14a5275 /Mailman/bin/mmsitepass.py | |
| parent | 99a4f0ef16e6dfddafbd396896afb97821528f16 (diff) | |
| download | mailman-8157935353a960cd03a72e403e8638b016c8e9a1.tar.gz mailman-8157935353a960cd03a72e403e8638b016c8e9a1.tar.zst mailman-8157935353a960cd03a72e403e8638b016c8e9a1.zip | |
Convert genaliases to mmshell, optparse, and configuration.config
bin/withlist: If there's no '@' in the listname, append the DEFAULT_EMAIL_HOST
so we always get a fully qualified list name.
bin/mmsitepass: plumb through -C/--config switch and be sure to call
config.load().
Convert Mailman/MTA/Postfix.py to configuration.config, and update MTA/Manual.
In mailman/Cgi/create, we can't convert straight from a string to a bool,
because bool('0') is True. We need to go through int first.
MailList.InitTempVars(): The logic here looked weird because we could get
'name' = None and that would break. Assume name is never None.
Diffstat (limited to 'Mailman/bin/mmsitepass.py')
| -rw-r--r-- | Mailman/bin/mmsitepass.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Mailman/bin/mmsitepass.py b/Mailman/bin/mmsitepass.py index b6576c8fa..3bd2c77d7 100644 --- a/Mailman/bin/mmsitepass.py +++ b/Mailman/bin/mmsitepass.py @@ -20,7 +20,8 @@ import getpass import optparse from Mailman import Utils -from Mailman import mm_cfg +from Mailman import Version +from Mailman.configuration import config from Mailman.i18n import _ __i18n_templates__ = True @@ -28,7 +29,7 @@ __i18n_templates__ = True def parseargs(): - parser = optparse.OptionParser(version=mm_cfg.MAILMAN_VERSION, + parser = optparse.OptionParser(version=Version.MAILMAN_VERSION, usage=_("""\ %prog [options] [password] @@ -48,6 +49,8 @@ If password is not given on the command line, it will be prompted for. Set the list creator password instead of the site password. The list creator is authorized to create and remove lists, but does not have the total power of the site administrator.""")) + parser.add_option('-C', '--config', + help=_('Alternative configuration file to use')) opts, args = parser.parse_args() if len(args) > 1: parser.print_help() @@ -59,6 +62,7 @@ the total power of the site administrator.""")) def main(): parser, opts, args = parseargs() + config.load(opts.config) if args: password = args[0] else: |
