Skip to content

Commit 4d8590e

Browse files
authored
use six library for isinstance (#66)
1 parent be43fe8 commit 4d8590e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

redisearch/_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
def to_string(s):
44
if isinstance(s, six.string_types):
55
return s
6-
elif isinstance(s, bytes):
6+
elif isinstance(s, six.binary_type):
77
return s.decode('utf-8')
88
else:
99
return s # Not a string we care about

redisearch/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def spellcheck(self, query, distance=None, include=None, exclude=None):
499499
return corrections
500500

501501
for _correction in raw:
502-
if isinstance(_correction, long) and _correction == 0:
502+
if isinstance(_correction, six.integer_types) and _correction == 0:
503503
continue
504504

505505
if len(_correction) != 3:

0 commit comments

Comments
 (0)