Commit 4553fd97 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Arnaud Fontaine

ZMySQLDA: explicitly cast to bytes in Python 3.

parent 029c8e8e
...@@ -466,6 +466,8 @@ class DB(TM): ...@@ -466,6 +466,8 @@ class DB(TM):
return items, result return items, result
def string_literal(self, s): def string_literal(self, s):
if six.PY3 and isinstance(s, six.text_type):
s = s.encode()
return self.db.string_literal(s) return self.db.string_literal(s)
def _begin(self, *ignored): def _begin(self, *ignored):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment