summaryrefslogtreecommitdiff
path: root/Mailman/bin/change_pw.py
diff options
context:
space:
mode:
authormsapiro2006-10-24 03:55:24 +0000
committermsapiro2006-10-24 03:55:24 +0000
commit3256c431e7bf966d3de49e4dc31dd01d57ffb02f (patch)
treee0f32257c2bc73eec34e4ebf2f50c27b0ff23a66 /Mailman/bin/change_pw.py
parentf0a263b63991efc787bfd870bd7a491c53dce54a (diff)
downloadmailman-3256c431e7bf966d3de49e4dc31dd01d57ffb02f.tar.gz
mailman-3256c431e7bf966d3de49e4dc31dd01d57ffb02f.tar.zst
mailman-3256c431e7bf966d3de49e4dc31dd01d57ffb02f.zip
Diffstat (limited to 'Mailman/bin/change_pw.py')
-rw-r--r--Mailman/bin/change_pw.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Mailman/bin/change_pw.py b/Mailman/bin/change_pw.py
index d77dd9787..fa0289907 100644
--- a/Mailman/bin/change_pw.py
+++ b/Mailman/bin/change_pw.py
@@ -23,8 +23,9 @@ from Mailman import Errors
from Mailman import MailList
from Mailman import Message
from Mailman import Utils
+from Mailman import Version
from Mailman import i18n
-from Mailman import mm_cfg
+from Mailman.configuration import config
_ = i18n._
__i18n_templates__ = True
@@ -34,7 +35,7 @@ SPACE = ' '
def parseargs():
- parser = optparse.OptionParser(version=mm_cfg.MAILMAN_VERSION,
+ parser = optparse.OptionParser(version=Version.MAILMAN_VERSION,
usage=_("""\
%%prog [options]
@@ -75,6 +76,8 @@ not given, lists will be assigned a randomly generated new password."""))
Don't notify list owners of the new password. You'll have to have some other
way of letting the list owners know the new password (presumably
out-of-band)."""))
+ parser.add_option('-C', '--config',
+ help=_('Alternative configuration file to use'))
opts, args = parser.parse_args()
if args:
parser.print_help()
@@ -107,6 +110,7 @@ def openlist(listname):
def main():
parser, opts, args = parseargs()
+ config.load(opts.config)
# Cull duplicates
domains = set(opts.domains)
@@ -135,7 +139,7 @@ def main():
try:
if opts.password is None:
randompw = Utils.MakeRandomPassword(
- mm_cfg.ADMIN_PASSWORD_LENGTH)
+ config.ADMIN_PASSWORD_LENGTH)
shapassword = sha.new(randompw).hexdigest()
notifypassword = randompw
else: