diff options
author | bwarsaw <> | 2004-12-30 23:41:09 +0000 |
---|---|---|
committer | bwarsaw <> | 2004-12-30 23:41:09 +0000 |
commit | e6402e44036af0529a35ff6e81cfc3108c1a96e1 (patch) | |
tree | 2c71c44668e13aa8155b7aed8f5b25c16af74616 /bin/reset_pw | |
parent | 43ccbb2caa517b891b99f307ab3e5cb66bc94555 (diff) | |
download | mailman2-e6402e44036af0529a35ff6e81cfc3108c1a96e1.tar.gz mailman2-e6402e44036af0529a35ff6e81cfc3108c1a96e1.tar.xz mailman2-e6402e44036af0529a35ff6e81cfc3108c1a96e1.zip |
Renamed reset_pw to reset_pw.py so that the file looks like a Python module.
This goes hand-in-hand with one of two changes to withlist. Now, withlist
puts the directory it's found in on the end of sys.path. This way it's much
easier to run withlist scripts that live in bin.
The other change allows running withlist w/o a list name, but only if -i is
given. Makes it easier to debug various non-list related parts of Mailman.
Diffstat (limited to '')
-rw-r--r-- | bin/reset_pw.py (renamed from bin/reset_pw) | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/reset_pw b/bin/reset_pw.py index d7e5527a..bddc1ace 100644 --- a/bin/reset_pw +++ b/bin/reset_pw.py @@ -26,7 +26,7 @@ responsibility to let the users know that their passwords have been changed. This script is intended to be run as a bin/withlist script, i.e. -% bin/withlist -l -r reset_pw [options] +% bin/withlist -l -r reset_pw listname [options] Options: -v / --verbose @@ -72,13 +72,17 @@ def reset_pw(mlist, *args): if opt in ('-v', '--verbose'): verbose = True - listname = mlist.listname() + listname = mlist.internal_name() if verbose: print _('Changing passwords for list: %(listname)s') for member in mlist.getMembers(): randompw = Utils.MakeRandomPassword() mlist.setMemberPassword(member, randompw) + if verbose: + print _('New password for member %(member)40s: %(randompw)s') + + mlist.Save() |