File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,12 @@ def parse_scalar(self, cell):
143
143
scalar = None
144
144
145
145
elif scalar_type == ResultSetScalarTypes .VALUE_STRING :
146
- scalar = str (value )
146
+ if isinstance (value , bytes ):
147
+ scalar = value .decode ()
148
+ elif not isinstance (value , str ):
149
+ scalar = str (value )
150
+ else :
151
+ scalar = value
147
152
148
153
elif scalar_type == ResultSetScalarTypes .VALUE_INTEGER :
149
154
scalar = int (value )
Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ def quote_string(v):
13
13
quote_string wraps given v with quotes incase
14
14
v is a string.
15
15
"""
16
- if not isinstance (v , str ):
16
+
17
+ if isinstance (v , bytes ):
18
+ v = v .decode ()
19
+ elif not isinstance (v , str ):
17
20
return v
18
21
if len (v ) == 0 :
19
22
return '""'
You can’t perform that action at this time.
0 commit comments