Skip to content

Commit

Permalink
Merge pull request #824 from SpiNNakerManchester/bad_E722
Browse files Browse the repository at this point in the history
Too broad an exception is not a good idea
  • Loading branch information
rowleya authored Jun 8, 2021
2 parents 09274ba + daeaac2 commit 69fede4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import logging
from spinn_utilities.progress_bar import ProgressBar
from spinn_utilities.log import FormatAdapter
from spinnman.exceptions import SpinnmanException
from spinn_front_end_common.utilities.utility_objs import ProvenanceDataItem

logger = FormatAdapter(logging.getLogger(__name__))
Expand Down Expand Up @@ -162,7 +163,7 @@ def _add_router_table_diagnostic(
if not self._machine.get_chip_at(x, y).virtual:
try:
diagnostics = self._txrx.get_router_diagnostics(x, y)
except: # noqa: E722
except SpinnmanException:
logger.warning(
"Could not read routing diagnostics from {}, {}",
x, y, exc_info=True)
Expand All @@ -184,7 +185,7 @@ def _add_unseen_router_chip_diagnostic(
# pylint: disable=bare-except
try:
diagnostics = self._txrx.get_router_diagnostics(chip.x, chip.y)
except: # noqa: E722
except SpinnmanException:
# There could be issues with unused chips - don't worry!
return
if (diagnostics.n_dropped_multicast_packets or
Expand Down

0 comments on commit 69fede4

Please sign in to comment.