[DRAFT] Catch only Exception, not BaseException

This commit is contained in:
Chris Hennes
2021-02-10 14:08:56 -06:00
committed by wwmayer
parent 8228d64ac4
commit fe7e45a7de
16 changed files with 26 additions and 26 deletions

View File

@@ -113,7 +113,7 @@ def label_to_scale(label):
try :
scale = float(label)
return scale
except :
except Exception:
if ":" in label:
f = label.split(":")
elif "=" in label:
@@ -126,7 +126,7 @@ def label_to_scale(label):
den = App.Units.Quantity(f[1]).Value
scale = num/den
return scale
except:
except Exception:
err = QT_TRANSLATE_NOOP("draft",
"Unable to convert input into a "
"scale factor")