Merge "Make try/except work for passlib 1.6 and 1.7"
This commit is contained in:
commit
e41308668c
@ -136,9 +136,10 @@ def hash_password(password):
|
||||
return passlib.hash.sha512_crypt.encrypt(
|
||||
password_utf8, rounds=CONF.crypt_strength)
|
||||
except DeprecationWarning:
|
||||
# TODO(stevemar): Remove this warning once we switch over to passlib
|
||||
# TODO(stevemar): Remove this try/except once we switch over to passlib
|
||||
# version 1.7.0 and replace encrypt() with hash()
|
||||
pass
|
||||
return passlib.hash.sha512_crypt.hash(
|
||||
password_utf8, rounds=CONF.crypt_strength)
|
||||
|
||||
|
||||
def check_password(password, hashed):
|
||||
|
Loading…
Reference in New Issue
Block a user