From 0c8bff7618c5dcbd9785154967f48c426375ed21 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 24 Apr 2012 14:32:58 +0000 Subject: [PATCH] 0021559: EDF 2175 SMESH: Hexa/Tetra mixed meshes (Bug2175_mixed_hexa_tetra.py) In Mesh.Compute(), detect failure by value returned from Mesh._mesh.Compute() and not by presence of messages --- src/SMESH_SWIG/smeshDC.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index b06710744..77fdfde37 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -1181,7 +1181,7 @@ class Mesh: if errText: errText += ". " errText += err.comment if allReasons != "":allReasons += "\n" - allReasons += '"%s" failed%s. Error: %s' %(err.algoName, shapeText, errText) + allReasons += '- "%s" failed%s. Error: %s' %(err.algoName, shapeText, errText) pass # Treat hyp errors @@ -1212,15 +1212,16 @@ class Mesh: " Revise Mesh.Compute() implementation in smeshDC.py!" pass if allReasons != "":allReasons += "\n" - allReasons += reason + allReasons += "- " + reason pass - if allReasons != "": - print '"' + GetName(self.mesh) + '"',"has not been computed:" + if not ok or allReasons != "": + msg = '"' + GetName(self.mesh) + '"' + if ok: msg += " has been computed with warnings" + else: msg += " has not been computed" + if allReasons != "": msg += ":" + else: msg += "." + print msg print allReasons - ok = False - elif not ok: - print '"' + GetName(self.mesh) + '"',"has not been computed." - pass pass if salome.sg.hasDesktop() and self.mesh.GetStudyId() >= 0: smeshgui = salome.ImportComponentGUI("SMESH") -- 2.30.2