From 2fa85b1a947390710a722d77a2cd9f9fc2a18bad Mon Sep 17 00:00:00 2001 From: Gabe R Date: Sun, 28 Jun 2020 20:25:39 -0500 Subject: [PATCH] Fixed use of bare except: --- src/wireviz/wireviz.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wireviz/wireviz.py b/src/wireviz/wireviz.py index 102a203..2eb33a4 100755 --- a/src/wireviz/wireviz.py +++ b/src/wireviz/wireviz.py @@ -411,7 +411,7 @@ class Cable: if isinstance(self.gauge, str): # gauge and unit specified try: g, u = self.gauge.split(' ') - except: + except Exception: raise Exception('Gauge must be a number, or number and unit separated by a space') self.gauge = g self.gauge_unit = u.replace('mm2', 'mm\u00B2') @@ -494,7 +494,7 @@ def parse(yaml_input, file_out=None, generate_bom=False): else: try: x = int(e) - except: + except Exception: x = e output.append(x) return output