From a8a9c6878bf51ffea8cfe9c063efa2af4cbb3474 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 22 Oct 2024 11:44:20 +0100 Subject: [PATCH 1/2] assert not None --- spinnman/transceiver/base_transceiver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/spinnman/transceiver/base_transceiver.py b/spinnman/transceiver/base_transceiver.py index 89c5bf8d6..30b13a2eb 100644 --- a/spinnman/transceiver/base_transceiver.py +++ b/spinnman/transceiver/base_transceiver.py @@ -1146,6 +1146,7 @@ def set_ip_tag(self, ip_tag: IPTag, use_sender: bool = False): for connection in connections: # Convert the host string host_string = ip_tag.ip_address + assert host_string is not None if host_string in ("localhost", ".", "0.0.0.0"): host_string = connection.local_ip_address ip_string = socket.gethostbyname(host_string) From aa6c69fb9b7c87a79ef7c33aad9e410cdc884ebf Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 13 Nov 2024 08:46:52 +0000 Subject: [PATCH 2/2] assert not needed as guaranteed by typing --- spinnman/transceiver/base_transceiver.py | 1 - 1 file changed, 1 deletion(-) diff --git a/spinnman/transceiver/base_transceiver.py b/spinnman/transceiver/base_transceiver.py index 30b13a2eb..89c5bf8d6 100644 --- a/spinnman/transceiver/base_transceiver.py +++ b/spinnman/transceiver/base_transceiver.py @@ -1146,7 +1146,6 @@ def set_ip_tag(self, ip_tag: IPTag, use_sender: bool = False): for connection in connections: # Convert the host string host_string = ip_tag.ip_address - assert host_string is not None if host_string in ("localhost", ".", "0.0.0.0"): host_string = connection.local_ip_address ip_string = socket.gethostbyname(host_string)