summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorshacharPash <93581407+shacharPash@users.noreply.github.com>2023-04-30 04:13:54 +0300
committerGitHub <noreply@github.com>2023-04-30 04:13:54 +0300
commit8b58ebb73e03970fade4d3f9e2c961831713c228 (patch)
tree6f24c2c1249b91c136d329805cf765c9982fe817 /redis/client.py
parent8e0b84d8a25c90070817c911af266cd5cabe1604 (diff)
downloadredis-py-8b58ebb73e03970fade4d3f9e2c961831713c228.tar.gz
return response in case of KeyError (#2628)
* return response in case of KeyError * fix code linters error * fix linters 2 * fix linters 3
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/redis/client.py b/redis/client.py
index 1a9b96b..79a7bff 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -518,10 +518,13 @@ def parse_geosearch_generic(response, **options):
Parse the response of 'GEOSEARCH', GEORADIUS' and 'GEORADIUSBYMEMBER'
commands according to 'withdist', 'withhash' and 'withcoord' labels.
"""
- if options["store"] or options["store_dist"]:
- # `store` and `store_dist` cant be combined
- # with other command arguments.
- # relevant to 'GEORADIUS' and 'GEORADIUSBYMEMBER'
+ try:
+ if options["store"] or options["store_dist"]:
+ # `store` and `store_dist` cant be combined
+ # with other command arguments.
+ # relevant to 'GEORADIUS' and 'GEORADIUSBYMEMBER'
+ return response
+ except KeyError: # it means the command was sent via execute_command
return response
if type(response) != list: