Skip to content

Commit 0e5a428

Browse files
committed
Added ServerNotReadyError to the list of errors caught by wait_for_server_initialization()
1 parent 0697b74 commit 0e5a428

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

brainframe/api/stub.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from requests.exceptions import ConnectionError, ReadTimeout
55

6-
from .bf_errors import UnauthorizedError, UnknownError
6+
from .bf_errors import UnauthorizedError, UnknownError, ServerNotReadyError
77
from . import stubs
88
from .stubs.base_stub import DEFAULT_TIMEOUT
99

@@ -59,8 +59,8 @@ def wait_for_server_initialization(self, timeout: float = None):
5959
try:
6060
# Test connection to server
6161
self.version()
62-
except (ConnectionError, ConnectionRefusedError,
63-
UnauthorizedError, ReadTimeout):
62+
except (ConnectionError, ConnectionRefusedError, ReadTimeout,
63+
UnauthorizedError, ServerNotReadyError):
6464
# Server not started yet or there is a communication
6565
# error
6666
pass

0 commit comments

Comments
 (0)