File tree Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -395,29 +395,16 @@ def on_connect(self):
395
395
# if a client_name is given, set it
396
396
if self .client_name :
397
397
self .send_command ("CLIENT" , "SETNAME" , self .client_name )
398
- if str_if_bytes (self .read_response ()) != "OK" :
399
- raise ConnectionError ("Error setting client name" )
400
398
401
- try :
402
- # set the library name and version
403
- if self .lib_name :
404
- self .send_command ("CLIENT" , "SETINFO" , "LIB-NAME" , self .lib_name )
405
- self .read_response ()
406
- except ResponseError :
407
- pass
408
-
409
- try :
410
- if self .lib_version :
411
- self .send_command ("CLIENT" , "SETINFO" , "LIB-VER" , self .lib_version )
412
- self .read_response ()
413
- except ResponseError :
414
- pass
399
+ # set the library name and version
400
+ if self .lib_name :
401
+ self .send_command ("CLIENT" , "SETINFO" , "LIB-NAME" , self .lib_name )
402
+ if self .lib_version :
403
+ self .send_command ("CLIENT" , "SETINFO" , "LIB-VER" , self .lib_version )
415
404
416
405
# if a database is specified, switch to it
417
406
if self .db :
418
407
self .send_command ("SELECT" , self .db )
419
- if str_if_bytes (self .read_response ()) != "OK" :
420
- raise ConnectionError ("Invalid Database" )
421
408
422
409
# if client caching is enabled, start tracking
423
410
if self .client_cache :
You can’t perform that action at this time.
0 commit comments