--- a/__init__.py Thu May 03 15:45:58 2012 +0200
+++ b/__init__.py Thu May 03 15:47:29 2012 +0200
@@ -41,6 +41,7 @@
from StringIO import StringIO
from logilab.common.logging_ext import set_log_methods
+from yams.constraints import BASE_CONVERTERS
if os.environ.get('APYCOT_ROOT'):
@@ -120,6 +121,13 @@
binary.seek(0)
return binary
+def str_or_binary(value):
+ if isinstance(value, Binary):
+ return value
+ return str(value)
+BASE_CONVERTERS['Password'] = str_or_binary
+
+
# use this dictionary to rename entity types while keeping bw compat
ETYPE_NAME_MAP = {}