summaryrefslogtreecommitdiff
path: root/passlib/exc.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2020-10-08 12:57:55 -0400
committerEli Collins <elic@assurancetechnologies.com>2020-10-08 12:57:55 -0400
commit969eb2cf0721d8395f06209e16ab52955746aa30 (patch)
tree0bedc6474f504966bb4eb67b28ba071fe887e391 /passlib/exc.py
parentdf3f02025c00a7623c6771c454cb3dfb2c29caa5 (diff)
parentcc21426e0f7a93e5dbd2c66d9752123924a1a4dc (diff)
downloadpasslib-969eb2cf0721d8395f06209e16ab52955746aa30.tar.gz
Merge from stable
As part of merge: * various: reverted the py26 compat fixes from rev 5e2f92012412 * test utils: stripped out "has_real_subtest" compat from rev c732a9e2a582, since now on py35+, which always has .subTest() method
Diffstat (limited to 'passlib/exc.py')
-rw-r--r--passlib/exc.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/passlib/exc.py b/passlib/exc.py
index 262eb12..29ef8af 100644
--- a/passlib/exc.py
+++ b/passlib/exc.py
@@ -193,17 +193,23 @@ class UnknownHashError(ValueError):
As of version 1.7.3, this may also be raised if hash algorithm is known,
but has been disabled due to FIPS mode (message will include phrase "disabled for fips").
+ As of version 1.7.4, this may be raised if a :class:`~passlib.context.CryptContext`
+ is unable to identify the algorithm used by a password hash.
+
.. versionadded:: 1.7
.. versionchanged: 1.7.3
added 'message' argument.
+
+ .. versionchanged:: 1.7.4
+ altered call signature.
"""
- def __init__(self, name, message=None):
- self.name = name
+ def __init__(self, message=None, value=None):
+ self.value = value
if message is None:
- message = "unknown hash algorithm: %r" % name
+ message = "unknown hash algorithm: %r" % value
self.message = message
- ValueError.__init__(self, name, message)
+ ValueError.__init__(self, message, value)
def __str__(self):
return self.message