summaryrefslogtreecommitdiff
path: root/scripts/icehashpassword.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-08-14 19:18:06 +0200
committerBenoit Foucher <benoit@zeroc.com>2018-08-14 19:19:01 +0200
commit36c5b59453617a0108b0b78e5fad6483804ad595 (patch)
tree6f5e9124beb2f759de8236cdc2b41b4852b89069 /scripts/icehashpassword.py
parentAlways run Xamarin tests in main thread (diff)
downloadice-36c5b59453617a0108b0b78e5fad6483804ad595.tar.bz2
ice-36c5b59453617a0108b0b78e5fad6483804ad595.tar.xz
ice-36c5b59453617a0108b0b78e5fad6483804ad595.zip
Fixed icehashpassword deprecation warning with python debug
Diffstat (limited to 'scripts/icehashpassword.py')
-rwxr-xr-xscripts/icehashpassword.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/icehashpassword.py b/scripts/icehashpassword.py
index 92e8932af63..486c417042e 100755
--- a/scripts/icehashpassword.py
+++ b/scripts/icehashpassword.py
@@ -119,9 +119,6 @@ def main():
usage()
return 2
- # passlib 1.7 renamed encrypt to hash
- encryptfn = passScheme.hash if hasattr(passScheme, "hash") else passScheme.encrypt
-
args = []
if sys.stdout.isatty():
args.append(getpass.getpass("Password: "))
@@ -135,7 +132,11 @@ def main():
if rounds:
opts["rounds"] = rounds
- print(encryptfn(*args, **opts))
+ # passlib 1.7 renamed encrypt to hash
+ if hasattr(passScheme, "hash"):
+ print(passScheme.using(**opts).hash(*args))
+ else:
+ print(passScheme.encrypt(*args, **opts))
return 0