From ff5bf3e0df80d2debc73ec497a370d7012d601e9 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Sun, 19 Sep 2021 14:37:23 -0500 Subject: [PATCH] PD: LGTM - don't catch BaseException --- src/Mod/PartDesign/FeatureHole/FeatureHole.py | 2 +- src/Mod/PartDesign/FeatureHole/TaskHole.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/PartDesign/FeatureHole/FeatureHole.py b/src/Mod/PartDesign/FeatureHole/FeatureHole.py index a4cc7275c3..da4d520d8f 100644 --- a/src/Mod/PartDesign/FeatureHole/FeatureHole.py +++ b/src/Mod/PartDesign/FeatureHole/FeatureHole.py @@ -153,7 +153,7 @@ class Hole(): secondLineIndex = i if (firstLineIndex > -1) and (secondLineIndex > -1): break - except: + except Exception: # Unknown curvetype GeomAbs_OtherCurve continue axis.References = [(support, elementList[0]), (support, "Edge" + str(firstLineIndex+1)), (support, "Edge" + str(secondLineIndex+1))] diff --git a/src/Mod/PartDesign/FeatureHole/TaskHole.py b/src/Mod/PartDesign/FeatureHole/TaskHole.py index b0752d356a..6805cb27bd 100644 --- a/src/Mod/PartDesign/FeatureHole/TaskHole.py +++ b/src/Mod/PartDesign/FeatureHole/TaskHole.py @@ -61,7 +61,7 @@ class TaskHole: body.removeObject(sketch) try: document.removeObject(sketch.Name) - except: + except Exception: pass # This always throws an exception: "Sketch support has been deleted" from SketchObject::execute() body.removeObject(plane) document.removeObject(plane.Name)