File tree 1 file changed +3
-2
lines changed
scripts/wrappers/common/cluster
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -565,7 +565,7 @@ def get_valid_connection_parts(connection):
565
565
"""
566
566
connection_parts = connection .split ("/" )
567
567
568
- if len (connection_parts ) not in range ( 2 , 3 ) :
568
+ if len (connection_parts ) not in [ 2 , 3 ] :
569
569
raise InvalidConnectionError (
570
570
"Expected format: <master_IP>:<master_PORT>/<token>[/<fingerprint>]"
571
571
)
@@ -582,7 +582,8 @@ def get_valid_connection_parts(connection):
582
582
raise InvalidConnectionError ("Invalid master IP" )
583
583
584
584
try :
585
- if int (master_ep [1 ]) not in range (1 , 65535 ):
585
+ port = int (master_ep [1 ])
586
+ if port < 1 or port > 65535 :
586
587
raise InvalidConnectionError ("Master PORT not in range 1:65535" )
587
588
except ValueError :
588
589
raise InvalidConnectionError ("Master PORT not a number" )
You can’t perform that action at this time.
0 commit comments