__init__.py
changeset 10680 1b4df4b3cd9a
parent 10665 79ff784cd8af
child 10907 9ae707db5265
--- a/__init__.py	Tue Sep 15 17:32:30 2015 +0200
+++ b/__init__.py	Tue Sep 15 18:21:33 2015 +0200
@@ -149,13 +149,13 @@
 
 
 def check_password(eschema, value):
-    return isinstance(value, (str, Binary))
+    return isinstance(value, (binary_type, Binary))
 BASE_CHECKERS['Password'] = check_password
 
 def str_or_binary(value):
     if isinstance(value, Binary):
         return value
-    return str(value)
+    return binary_type(value)
 BASE_CONVERTERS['Password'] = str_or_binary