File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,29 @@ def on_connect(self):
412
412
self .read_response ()
413
413
self ._parser .set_invalidation_push_handler (self ._cache_invalidation_process )
414
414
415
+ # execute the MULTI block
416
+ try :
417
+ self .send_command ('EXEC' )
418
+ responses = self ._read_exec_responses ()
419
+ # check AUTH response if AUTH command was sent
420
+ if auth_command_response :
421
+ # First response should be for AUTH command
422
+ auth_response = responses [0 ]
423
+ if b'ERR' in auth_response :
424
+ raise AuthenticationError (
425
+ "Authentication failed: %s" % auth_response )
426
+ responses = responses [1 :] # Remove AUTH response from the list
427
+
428
+ self ._handle_responses (responses , auth_args )
429
+ except (TimeoutError , AuthenticationError , ConnectionError ) as e :
430
+ if not self .retry_on_timeout :
431
+ raise e
432
+ except Exception as e :
433
+ if str (e ) == "Invalid Username or Password" :
434
+ raise AuthenticationError ("Invalid Username or Password" ) from e
435
+ else :
436
+ raise AuthenticationError () from e
437
+
415
438
def disconnect (self , * args ):
416
439
"Disconnects from the Redis server"
417
440
self ._parser .on_disconnect ()
You can’t perform that action at this time.
0 commit comments