summaryrefslogtreecommitdiff
path: root/Mailman/bin/newlist.py
diff options
context:
space:
mode:
authorbwarsaw2007-03-27 02:52:48 +0000
committerbwarsaw2007-03-27 02:52:48 +0000
commitc1baffd25ba7290efcf7b1617ef08886712368f2 (patch)
tree6476aa6ce443dcea206241d6824e52bb320a9136 /Mailman/bin/newlist.py
parent864162b05e64a351d17e45fd888fbaa822db93b2 (diff)
downloadmailman-c1baffd25ba7290efcf7b1617ef08886712368f2.tar.gz
mailman-c1baffd25ba7290efcf7b1617ef08886712368f2.tar.zst
mailman-c1baffd25ba7290efcf7b1617ef08886712368f2.zip
Diffstat (limited to 'Mailman/bin/newlist.py')
-rw-r--r--Mailman/bin/newlist.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Mailman/bin/newlist.py b/Mailman/bin/newlist.py
index bde615974..5ac2dc5a6 100644
--- a/Mailman/bin/newlist.py
+++ b/Mailman/bin/newlist.py
@@ -27,6 +27,7 @@ from Mailman import Utils
from Mailman import Version
from Mailman import i18n
from Mailman import passwords
+from Mailman.bin.mmsitepass import check_password_scheme
from Mailman.configuration import config
from Mailman.initialize import initialize
@@ -74,7 +75,7 @@ still sends the notification. It can be used to make newlist totally
non-interactive but still send the notification, assuming listname,
listadmin-addr and admin-password are all specified on the command line."""))
parser.add_option('-p', '--password-scheme',
- default='ssha', type='string', help=_("""\
+ default='', type='string', help=_("""\
Specify the RFC 2307 style hashing scheme for passwords included in the
output. Use -P to get a list of supported schemes, which are
case-insensitive."""))
@@ -86,11 +87,9 @@ case-insensitive."""))
help=_('Alternative configuration file to use'))
opts, args = parser.parse_args()
if opts.list_hash_schemes:
- for label in passwords.SCHEMES:
- print label.upper()
+ for label in passwords.Schemes:
+ print str(label).upper()
sys.exit(0)
- if opts.password_scheme.lower() not in passwords.SCHEMES:
- parser.error(_('Invalid password scheme'))
# Can't verify opts.language here because the configuration isn't loaded
# yet.
return parser, opts, args
@@ -162,7 +161,8 @@ def main():
# set available_languages.
mlist.preferred_language = opts.language
try:
- pw = passwords.make_secret(listpasswd, config.PASSWORD_SCHEME)
+ scheme = check_password_scheme(parser, opts.password_scheme)
+ pw = passwords.make_secret(listpasswd, scheme)
try:
mlist.Create(fqdn_listname, owner_mail, pw)
except Errors.BadListNameError, s: