Salome HOME
Merge branch 'OCCT780'
[modules/smesh.git] / doc / examples / creating_meshes_ex01.py
index e5cb0e9346c827763f539c3b9f573d0dd97966cb..0a174d8a3c71ea3027abc6ebd0f7f501ed66ec75 100644 (file)
@@ -27,8 +27,7 @@ algo3D.MaxElementVolume(900.)
 
 # compute the mesh
 ret = tetra.Compute()
-if ret == 0:
-    print("problem when computing the mesh")
-else:
-    print("mesh computed")
-    pass
+if not ret:
+    raise Exception("problem when computing the mesh")
+
+print("mesh computed")