]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
prevent GetName() failure on a not CORBA object
authoreap <eap@opencascade.com>
Fri, 28 Dec 2012 15:50:11 +0000 (15:50 +0000)
committereap <eap@opencascade.com>
Fri, 28 Dec 2012 15:50:11 +0000 (15:50 +0000)
src/SMESH_SWIG/smeshDC.py

index 24095c5b08d8d7312c6093c739174117397fde7c..02d2daa61658fdb15ce97bb721c6ec62666e2146 100644 (file)
@@ -186,7 +186,10 @@ def GetName(obj):
         if isinstance(obj, SALOMEDS._objref_SObject):
             # study object
             return obj.GetName()
-        ior  = salome.orb.object_to_string(obj)
+        try:
+            ior  = salome.orb.object_to_string(obj)
+        except:
+            ior = None
         if ior:
             # CORBA object
             studies = salome.myStudyManager.GetOpenStudies()