Catch the proper exception and force the schem to upper case.

fix #514
This commit is contained in:
Antoine Nguyen
2014-01-22 17:26:44 +01:00
parent 539543ae4c
commit e779109125
+2 -2
View File
@@ -20,7 +20,7 @@ def get_password_hasher(scheme):
"""
try:
scheme = scheme.replace('-', '')
hasher = globals()['%sHasher' % scheme]
except AttributeError:
hasher = globals()['%sHasher' % scheme.upper()]
except KeyError:
hasher = PLAINHasher
return hasher