summaryrefslogtreecommitdiff
path: root/db.py
diff options
context:
space:
mode:
authorSylvain <syt@logilab.fr>2007-12-07 12:50:04 +0100
committerSylvain <syt@logilab.fr>2007-12-07 12:50:04 +0100
commit8f1399c093af0d1f90e445445966922b1c9f1568 (patch)
tree317e8dfff07507954106686e5a47c8464c296344 /db.py
parentf16558e76482a5f68680d13d86a23c1000fa59cd (diff)
downloadlogilab-common-8f1399c093af0d1f90e445445966922b1c9f1568.tar.gz
may return an array instance
Diffstat (limited to 'db.py')
-rw-r--r--db.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/db.py b/db.py
index b2a66a1..0a9dcbf 100644
--- a/db.py
+++ b/db.py
@@ -442,6 +442,8 @@ class _MySqlDBAdapter(DBAPIAdapter):
# hack to differentiate mediumtext (String) and tinyblob/longblog
# (Password/Bytes) which are all sharing the same type code :(
if typecode == self.BINARY:
+ if hasattr(value, 'tostring'): # may be an array
+ value = value.tostring()
maxsize = description[3]
if maxsize == 16777215: # mediumtext (2**24 - 1)
if isinstance(value, str):