]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020701: Additional fix concerned to the GetName Method changes.
authordmv <dmv@opencascade.com>
Thu, 18 Feb 2010 11:28:58 +0000 (11:28 +0000)
committerdmv <dmv@opencascade.com>
Thu, 18 Feb 2010 11:28:58 +0000 (11:28 +0000)
src/SMESH_SWIG/smeshDC.py

index 24a76894c45f895a49fcbab1670b7c617f4cfd2b..77e8459ab5a71ee995236a595cd7f1ab84ee378f 100644 (file)
@@ -455,10 +455,12 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo):
         return
     hypName = '"' + hypName + '"'
     geomName= '"' + geomName+ '"'
-    if status < HYP_UNKNOWN_FATAL:
+    if status < HYP_UNKNOWN_FATAL and not geomName =='""':
         print hypName, "was assigned to",    geomName,"but", reason
-    else:
+    elif not geomName == '""':
         print hypName, "was not assigned to",geomName,":", reason
+    else:
+        print hypName, "was not assigned:", reason
         pass
 
 ## Check meshing plugin availability
@@ -1309,7 +1311,11 @@ class Mesh:
             pass
         status = self.mesh.AddHypothesis(geom, hyp)
         isAlgo = hyp._narrow( SMESH_Algo )
-        TreatHypoStatus( status, GetName( hyp ), GetName( geom ), isAlgo )
+        hyp_name = GetName( hyp )
+        geom_name = ""
+        if geom:
+            hyp_name = GetName( geom )
+        TreatHypoStatus( status, hyp_name, geom_name, isAlgo )
         return status
 
     ## Unassigns a hypothesis