From d37dbe41087fc02119f005c4fcdea88a8a52abfa Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Tue, 21 Nov 2023 13:14:32 +0000 Subject: [PATCH] fix exception call --- spinn_machine/machine.py | 2 +- unittests/data/test_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spinn_machine/machine.py b/spinn_machine/machine.py index 45092259..11ec02f3 100644 --- a/spinn_machine/machine.py +++ b/spinn_machine/machine.py @@ -338,7 +338,7 @@ def where_is_chip(self, chip: Chip) -> str: return (f"global chip {chip.x}, {chip.y} on {chip00.ip_address} " f"is chip {localx}, {localy} {ip_address}") except Exception: # pylint: disable=broad-except - return str(Chip) + return str(chip) def where_is_xy(self, x: int, y: int) -> str: """ diff --git a/unittests/data/test_data.py b/unittests/data/test_data.py index 292064c6..f0647bde 100644 --- a/unittests/data/test_data.py +++ b/unittests/data/test_data.py @@ -91,6 +91,6 @@ def test_where_is_setup(self): "global chip 2, 8 on 127.0.0.0 is chip 6, 4 on 127.0.8.4", MachineDataView.where_is_chip(machine.get_chip_at(2, 8))) self.assertEqual( - "'NoneType' object has no attribute 'nearest_ethernet_x'", + "None", MachineDataView.where_is_chip(None) )