From d7b0855638603c7db6b5d65854e40dc61ceeb4bf Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 28 Dec 2012 15:50:11 +0000 Subject: [PATCH] prevent GetName() failure on a not CORBA object --- src/SMESH_SWIG/smeshDC.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 24095c5b0..02d2daa61 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -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() -- 2.39.2