]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug IPAL11942
authorapo <apo@opencascade.com>
Fri, 24 Mar 2006 08:36:52 +0000 (08:36 +0000)
committerapo <apo@opencascade.com>
Fri, 24 Mar 2006 08:36:52 +0000 (08:36 +0000)
   "AttributeError" is raised by "CreatePrsForMed()".

src/VISU_SWIG/visu.py

index ea05e2bf4578b6c7a86d4c306a3f41fe5e57c0c8..c287e79aa922c4abff22e41042e8bdd24826b940 100644 (file)
@@ -345,7 +345,9 @@ def CreatePrsForResult(theVisu, theResult, theView, thePrsTypeList, thePictureDi
         while aFolderIter.More() :
             aFolderSObj = aFolderIter.Value()
             aFolderIter.Next()
-            anAttr = aFolderSObj.FindAttribute("AttributeName")[1]
+            anIsFound, anAttr = aFolderSObj.FindAttribute("AttributeName")
+            if not anIsFound :
+                continue
             anAttr = anAttr._narrow(SALOMEDS.AttributeName);
             aFolderName = anAttr.Value()
             print "    ", aFolderName