[Python 3 compatibility] 'qtLiteral' functions needs to return data in

unicode.
This commit is contained in:
Murtuza Zabuawala 2016-01-07 19:33:25 +05:30 committed by Ashesh Vashi
parent 30a316ad09
commit b1dbcd0932

View File

@ -760,7 +760,14 @@ class Driver(BaseDriver):
@staticmethod
def qtLiteral(value):
return adapt(value).getquoted()
res = adapt(value).getquoted()
# Returns in bytes, we need to convert it in string
if isinstance(res, bytes):
return res.decode()
else:
return res
@staticmethod
def ScanKeywordExtraLookup(key):