diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-10-25 17:18:27 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 17:18:27 +0300 |
commit | ddd1496782cc8eb15fca6c9059b2b08a03efe366 (patch) | |
tree | ab907bd2fd2f7cfb951e750de69ea9d4478a5b9c /redis/commands/search/_util.py | |
parent | 3946da29d7e451a20289fb6e282516fa24e402af (diff) | |
download | redis-py-ddd1496782cc8eb15fca6c9059b2b08a03efe366.tar.gz |
Adding support for redisearch (#1640)
Diffstat (limited to 'redis/commands/search/_util.py')
-rw-r--r-- | redis/commands/search/_util.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/redis/commands/search/_util.py b/redis/commands/search/_util.py new file mode 100644 index 0000000..b4ac19f --- /dev/null +++ b/redis/commands/search/_util.py @@ -0,0 +1,10 @@ +import six + + +def to_string(s): + if isinstance(s, six.string_types): + return s + elif isinstance(s, six.binary_type): + return s.decode("utf-8", "ignore") + else: + return s # Not a string we care about |