Salome HOME
Python3 porting: adoptation SMESH dump python functionality.
[modules/smesh.git] / src / SMESH_SWIG / batchmode_smesh.py
index a78f922ca014765026acb4c554f5e572375946c0..6815bbbe035fec612cf407d63fc4269111352643 100644 (file)
@@ -38,7 +38,7 @@ smesh.SetCurrentStudy(myStudy)
 myStudyBuilder = myStudy.NewBuilder()
 
 if myStudyBuilder is None:
-    raise RuntimeError, " Null myStudyBuilder"
+    raise RuntimeError(" Null myStudyBuilder")
 
 father = myStudy.FindComponent("SMESH")
 if father is None:
@@ -145,7 +145,7 @@ def AddNewAlgorithms(IOR):
 
     res, AlgorithmsRoot = mySComponentMesh.FindSubObject (Tag_AlgorithmsRoot)
     if  AlgorithmsRoot is None or res == 0:
-        AlgorithmsRoot = myStudyBuilde.NewObjectToTag (mySComponentMesh, Tag_AlgorithmsRoot)
+        AlgorithmsRoot = myStudyBuilder.NewObjectToTag (mySComponentMesh, Tag_AlgorithmsRoot)
         aName = myStudyBuilder.FindOrCreateAttribute(AlgorithmsRoot, "AttributeName")
         aName.SetValue("Algorithms")
         aSelAttr = myStudyBuilder.FindOrCreateAttribute(AlgorithmsRoot, "AttributeSelectable")
@@ -156,7 +156,7 @@ def AddNewAlgorithms(IOR):
   # Add New Algorithms
     newHypo = myStudyBuilder.NewObject(AlgorithmsRoot)
     aPixmap = myStudyBuilder.FindOrCreateAttribute(newHypo, "AttributePixMap")
-    aPixmap = anAttr._narrow(SALOMEDS.AttributePixMap)
+    aPixmap = aPixmap._narrow(SALOMEDS.AttributePixMap)
     H = orb.string_to_object(IOR)
     aType = H.GetName();    #QString in fact
     aPixmap.SetPixMap( "mesh_tree_algo.png_" + aType )