Skip to content

Commit 317ea3a

Browse files
authored
Fix protocol checking for search commands (#2923)
1 parent 7c4f167 commit 317ea3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redis/commands/search/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from redis.client import Pipeline
66
from redis.utils import deprecated_function
77

8-
from ..helpers import parse_to_dict
8+
from ..helpers import get_protocol_version, parse_to_dict
99
from ._util import to_string
1010
from .aggregation import AggregateRequest, AggregateResult, Cursor
1111
from .document import Document
@@ -64,7 +64,7 @@ class SearchCommands:
6464
"""Search commands."""
6565

6666
def _parse_results(self, cmd, res, **kwargs):
67-
if self.client.connection_pool.connection_kwargs.get("protocol") in ["3", 3]:
67+
if get_protocol_version(self.client) in ["3", 3]:
6868
return res
6969
else:
7070
return self._RESP2_MODULE_CALLBACKS[cmd](res, **kwargs)

0 commit comments

Comments
 (0)