From 24474b4434925aa5d3b6ffb9214261eba57d18df Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 2 Sep 2019 09:52:36 +0200 Subject: [PATCH] Made too broad exception handling more specific --- plugins/SimulationView/SimulationView.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index b3f527acae..28d5a74523 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -386,7 +386,7 @@ class SimulationView(CuraView): self._max_thickness = max(float(p.lineThicknesses.max()), self._max_thickness) try: self._min_thickness = min(float(p.lineThicknesses[numpy.nonzero(p.lineThicknesses)].min()), self._min_thickness) - except: + except ValueError: # Sometimes, when importing a GCode the line thicknesses are zero and so the minimum (avoiding # the zero) can't be calculated Logger.log("i", "Min thickness can't be calculated because all the values are zero")