File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -435,6 +435,19 @@ def on_connect(self):
435
435
else :
436
436
raise AuthenticationError () from e
437
437
438
+ def _read_exec_responses (self ):
439
+ # read the response for EXEC which should be a list
440
+ response = self .read_response ()
441
+ if response == b'OK' and not self .retry_on_timeout :
442
+ # EXEC did not execute correctly, likely due to previous error
443
+ raise ConnectionError ("EXEC command did not execute correctly" )
444
+ while response == b'QUEUED' :
445
+ response = self .read_response ()
446
+ if not isinstance (response , list ) and not self .retry_on_timeout :
447
+ raise ConnectionError (f"EXEC command did not return a list: { response } " )
448
+ return response
449
+
450
+
438
451
def disconnect (self , * args ):
439
452
"Disconnects from the Redis server"
440
453
self ._parser .on_disconnect ()
You can’t perform that action at this time.
0 commit comments