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

unicode.
pull/3/head
Murtuza Zabuawala 2016-01-07 19:33:25 +05:30 committed by Ashesh Vashi
parent 30a316ad09
commit b1dbcd0932
1 changed files with 8 additions and 1 deletions

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):