From 387cd8c6eb4929f447ae1b2694541681044be08d Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Mon, 30 Oct 2023 08:13:11 +0000 Subject: [PATCH] Allow no reply here --- spinnman/messages/scp/impl/count_state_response.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spinnman/messages/scp/impl/count_state_response.py b/spinnman/messages/scp/impl/count_state_response.py index 980fb839e..ba3b4608f 100644 --- a/spinnman/messages/scp/impl/count_state_response.py +++ b/spinnman/messages/scp/impl/count_state_response.py @@ -34,7 +34,9 @@ def __init__(self): @overrides(AbstractSCPResponse.read_data_bytestring) def read_data_bytestring(self, data: bytes, offset: int): result = self.scp_response_header.result - if result != SCPResult.RC_OK: + # We can accept a no-reply response here; that could just mean + # that the count wasn't complete (but might be enough anyway) + if result != SCPResult.RC_OK and result != SCPResult.RC_P2P_NOREPLY: raise SpinnmanUnexpectedResponseCodeException( "CountState", "CMD_COUNT", result.name) self._count = _ONE_WORD.unpack_from(data, offset)[0]