From 80d4e38b710b602a22da727f3faed6c58df7987d Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 30 Apr 2010 08:21:21 +0000 Subject: [PATCH] in Compute(), protect from exceptions while searching subshape name --- src/SMESH_SWIG/smeshDC.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 7ee49b228..96f64da1a 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -1208,17 +1208,14 @@ class Mesh: if len(ids) == 1 and ids[0] == err.subShapeID: shapeText = '"%s"' % subSO.GetName() break - pass - pass - pass - except: pass - if not shapeText: - shape = self.geompyD.GetSubShape( geom, [err.subShapeID]) - if shape: - shapeText = "%s #%s" % (shape.GetShapeType(), err.subShapeID) - else: - shapeText = "%subshape #%s" % (err.subShapeID) - pass + if not shapeText: + shape = self.geompyD.GetSubShape( geom, [err.subShapeID]) + if shape: + shapeText = "%s #%s" % (shape.GetShapeType(), err.subShapeID) + else: + shapeText = "%subshape #%s" % (err.subShapeID) + except: + shapeText = "%subshape #%s" % (err.subShapeID) errText = "" stdErrors = ["OK", #COMPERR_OK "Invalid input mesh", #COMPERR_BAD_INPUT_MESH -- 2.39.2