From: eap Date: Fri, 28 Dec 2012 15:50:11 +0000 (+0000) Subject: prevent GetName() failure on a not CORBA object X-Git-Tag: pluginMGCleaner~198 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d7b0855638603c7db6b5d65854e40dc61ceeb4bf;p=modules%2Fsmesh.git prevent GetName() failure on a not CORBA object --- 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()