[1.4.x] Fixed #21248 -- Skipped test_bcrypt if no py-bcrypt found
Pre 1.6 Django worked only with py-bcrypt, not with bcrypt. Skipped test_bcrypt when using bcrypt to avoid false positives. Backpatch of 9f8a36eb20895d9e542820d5190bfa77ad1b85d9 from stable/1.5.x.
This commit is contained in:
parent
e2403db95a
commit
037ec1054c
@ -14,6 +14,10 @@ except ImportError:
|
||||
|
||||
try:
|
||||
import bcrypt
|
||||
# Django 1.4 works only with py-bcrypt, not with bcrypt. py-bcrypt has
|
||||
# '_bcrypt' attribute, bcrypt doesn't.
|
||||
if not hasattr(bcrypt, '_bcrypt'):
|
||||
bcrypt = None
|
||||
except ImportError:
|
||||
bcrypt = None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user