From 9571a89e3bd051b4a1c59a51435ffa0a28488654 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Thu, 3 Aug 2023 16:29:52 +0100 Subject: [PATCH] use create_transceiver_from_connections --- spinnman/spalloc/spalloc_client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spinnman/spalloc/spalloc_client.py b/spinnman/spalloc/spalloc_client.py index 84c5bedbe..bcff0f9f4 100644 --- a/spinnman/spalloc/spalloc_client.py +++ b/spinnman/spalloc/spalloc_client.py @@ -35,7 +35,8 @@ from spinnman.constants import SCP_SCAMP_PORT, UDP_BOOT_CONNECTION_DEFAULT_PORT from spinnman.exceptions import SpinnmanTimeoutException from spinnman.exceptions import SpallocException -from spinnman.transceiver.version5Transceiver import Version5Transceiver +from spinnman.transceiver import ( + AbstractTransceiver, create_transceiver_from_connections) from .spalloc_state import SpallocState from .proxy_protocol import ProxyProtocol from .session import Session, SessionAware @@ -635,14 +636,14 @@ def _keepalive_handle(self, handle): self.__keepalive_handle = handle @overrides(SpallocJob.create_transceiver) - def create_transceiver(self) -> Version5Transceiver: + def create_transceiver(self) -> AbstractTransceiver: if self.get_state() != SpallocState.READY: raise SpallocException("job not ready to execute scripts") proxies = [ self.connect_to_board(x, y) for (x, y) in self.get_connections()] # Also need a boot connection proxies.append(self.connect_for_booting()) - return Version5Transceiver(connections=proxies) + return create_transceiver_from_connections(connections=proxies) def __repr__(self): return f"SpallocJob({self._url})"