prevent GetName() failure on a not CORBA object

This commit is contained in:
eap 2012-12-28 15:50:11 +00:00
parent a763cfdd81
commit d7b0855638

View 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()