mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-15 12:50:37 +05:00
prevent GetName() failure on a not CORBA object
This commit is contained in:
parent
a763cfdd81
commit
d7b0855638
@ -186,7 +186,10 @@ def GetName(obj):
|
|||||||
if isinstance(obj, SALOMEDS._objref_SObject):
|
if isinstance(obj, SALOMEDS._objref_SObject):
|
||||||
# study object
|
# study object
|
||||||
return obj.GetName()
|
return obj.GetName()
|
||||||
ior = salome.orb.object_to_string(obj)
|
try:
|
||||||
|
ior = salome.orb.object_to_string(obj)
|
||||||
|
except:
|
||||||
|
ior = None
|
||||||
if ior:
|
if ior:
|
||||||
# CORBA object
|
# CORBA object
|
||||||
studies = salome.myStudyManager.GetOpenStudies()
|
studies = salome.myStudyManager.GetOpenStudies()
|
||||||
|
Loading…
Reference in New Issue
Block a user