diff --git a/spinnman/spalloc/spalloc_client.py b/spinnman/spalloc/spalloc_client.py index 9ecab5b66..c81b6a48b 100644 --- a/spinnman/spalloc/spalloc_client.py +++ b/spinnman/spalloc/spalloc_client.py @@ -617,7 +617,7 @@ def open_udp_listener_connection(self) -> UDPConnection: def wait_for_state_change(self, old_state: SpallocState, n_retries: Optional[int] = None) -> SpallocState: retries = 0 - while (old_state != SpallocState.DESTROYED and + while (old_state != SpallocState.DESTROYED and (n_retries is None or retries < n_retries)): retries += 1 obj = self._get(self._url, wait="true", timeout=None).json()