summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/auth/tests/hashers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/auth/tests/hashers.py b/django/contrib/auth/tests/hashers.py
index 2b2243cb0c..be56fde378 100644
--- a/django/contrib/auth/tests/hashers.py
+++ b/django/contrib/auth/tests/hashers.py
@@ -16,6 +16,10 @@ except ImportError:
try:
import bcrypt
+ # Django 1.5 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