]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
in Compute(), protect from exceptions while searching subshape name
authoreap <eap@opencascade.com>
Fri, 30 Apr 2010 08:21:21 +0000 (08:21 +0000)
committereap <eap@opencascade.com>
Fri, 30 Apr 2010 08:21:21 +0000 (08:21 +0000)
src/SMESH_SWIG/smeshDC.py

index 7ee49b2283055655fd82f88c047a92958a7976f2..96f64da1a236335656891e212d68b5118c290eae 100644 (file)
@@ -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