diff options
| author | klm | 1998-12-03 17:02:32 +0000 |
|---|---|---|
| committer | klm | 1998-12-03 17:02:32 +0000 |
| commit | fd2b46fd552f03a8e564eaa9655d18ea9e9173c0 (patch) | |
| tree | eacf3c84f4d84eb3c377318c4f6022bccfe3eff1 | |
| parent | 84947c6efe4cfc039a857bb66dec7d47122c9987 (diff) | |
| download | mailman-fd2b46fd552f03a8e564eaa9655d18ea9e9173c0.tar.gz mailman-fd2b46fd552f03a8e564eaa9655d18ea9e9173c0.tar.zst mailman-fd2b46fd552f03a8e564eaa9655d18ea9e9173c0.zip | |
main(): Was not accepting password from command line because len(args)
was being rejected if >= 2, when it should be rejected only when > 2.
Added confirmation step for assurance the user's entering what they
think (and slightly changed phrasing of prompt for clarity).
All was suggested by guido.
| -rwxr-xr-x | bin/mmsitepass | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/mmsitepass b/bin/mmsitepass index 32a3a6f41..594aea2ed 100755 --- a/bin/mmsitepass +++ b/bin/mmsitepass @@ -28,14 +28,18 @@ import getpass from Mailman import MailList def main(argv): - if len(sys.argv) >= 2: + if len(sys.argv) > 2: print "Usage: mmsitepass [ password ]" raise SystemExit, 1 elif len(sys.argv) == 2: pw = sys.argv[1] else: try: - pw = getpass.getpass("Password: ") + pw = getpass.getpass("New Password: ") + confirm = getpass.getpass("Again to confirm: ") + if pw != confirm: + print "Mismatch - password not changed." + raise SystemExit, 1 except KeyboardInterrupt: print "Interrupted..." raise SystemExit, 1 |
