Skip to content

Commit 60ad0a4

Browse files
Gnaneshswilly22
Gnanesh
authored andcommitted
Assign local variable scalar and compare bytes of two values (#37)
* Assign a val to local variable `scalar` before returning Compare bytes of two values * decode `value` before checking
1 parent 88d50cc commit 60ad0a4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

redisgraph/query_result.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def parse_edge(self, cell):
116116
def parse_scalar(self, cell):
117117
scalar_type = int(cell[0])
118118
value = cell[1]
119+
scalar = None
119120

120121
if scalar_type == ResultSetScalarTypes.PROPERTY_NULL:
121122
scalar = None
@@ -127,6 +128,7 @@ def parse_scalar(self, cell):
127128
scalar = int(value)
128129

129130
elif scalar_type == ResultSetScalarTypes.PROPERTY_BOOLEAN:
131+
value = value.decode() if isinstance(value, bytes) else value
130132
if value == "true":
131133
scalar = True
132134
elif value == "false":

0 commit comments

Comments
 (0)