Skip to content

Commit

Permalink
fix exception call
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Nov 21, 2023
1 parent 813cf18 commit d37dbe4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spinn_machine/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down
2 changes: 1 addition & 1 deletion unittests/data/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)

0 comments on commit d37dbe4

Please sign in to comment.