@@ -46,11 +46,11 @@ def version(self, timeout=DEFAULT_TIMEOUT) -> str:
4646 resp , _ = self ._get_json (req , timeout )
4747 return resp
4848
49- def wait_for_server_initialization (self , timeout : int = None ):
49+ def wait_for_server_initialization (self , timeout : float = None ):
5050 """Waits for the server to be ready to handle requests.
5151
52- :param timeout: The maximum amount of time to wait for the server to
53- start. If None, this method will wait indefinitely.
52+ :param timeout: The maximum amount of time, in seconds, to wait for the
53+ server to start. If None, this method will wait indefinitely.
5454 """
5555 start_time = time ()
5656 while True :
@@ -60,11 +60,6 @@ def wait_for_server_initialization(self, timeout: int = None):
6060 try :
6161 # Test connection to server
6262 self .version ()
63- # TODO: Remove this check and let the user know about the
64- # license not being valid
65- license_info = self .get_license_info ()
66- if license_info .state is LicenseState .VALID :
67- break
6863 except (ConnectionError , ConnectionRefusedError ,
6964 UnauthorizedError , ReadTimeout ):
7065 # Server not started yet or there is a communication
@@ -73,6 +68,8 @@ def wait_for_server_initialization(self, timeout: int = None):
7368 except UnknownError as exc :
7469 if exc .status_code not in [502 ]:
7570 raise
71+ else :
72+ break
7673
7774 # Prevent busy loop
7875 sleep (.1 )
0 commit comments