diff options
author | Barry Warsaw <barry@list.org> | 2008-11-12 23:02:29 -0500 |
---|---|---|
committer | Barry Warsaw <barry@list.org> | 2008-11-12 23:02:29 -0500 |
commit | a86be44b08fe0935fe77d90948b9baad85af3624 (patch) | |
tree | cc9b8b20530f1d54975005d19f9a17fddade945d /bin/change_pw | |
parent | 392554b8de4641c8ac9c5ca1e062919a64ecd020 (diff) | |
download | mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.tar.gz mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.tar.xz mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.zip |
Apply Heiko Rommel's patch for hashlib deprecation warnings for bug 293178.
I've modified the patch to improve some of the stylistic issues.
Diffstat (limited to 'bin/change_pw')
-rw-r--r-- | bin/change_pw | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/change_pw b/bin/change_pw index 965f5e50..67d56392 100644 --- a/bin/change_pw +++ b/bin/change_pw @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 2001-2007 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2008 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -66,7 +66,6 @@ Options: """ import sys -import sha import getopt import paths @@ -147,7 +146,7 @@ def main(): if password is not None: if not password: usage(1, _('Empty list passwords are not allowed')) - shapassword = sha.new(password).hexdigest() + shapassword = Utils.sha_new(password).hexdigest() if domains: for name in Utils.list_names(): @@ -167,7 +166,7 @@ def main(): if password is None: randompw = Utils.MakeRandomPassword( mm_cfg.ADMIN_PASSWORD_LENGTH) - shapassword = sha.new(randompw).hexdigest() + shapassword = Utils.sha_new(randompw).hexdigest() notifypassword = randompw else: notifypassword = password |