]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Move python code execution to second part
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 8 Apr 2020 04:45:47 +0000 (06:45 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 8 Apr 2020 04:45:47 +0000 (06:45 +0200)
src/Container/SALOME_PyNode.py

index b74a7f2f78e580847bd3070c91cff71566c311a2..fec7107ae0921fb4133d6731d6a8afc5b17828ae 100644 (file)
@@ -145,10 +145,10 @@ class PyScriptNode_i (Engines__POA.PyScriptNode,Generic):
 
   def executeFirst(self,argsin):
     """ Same than first part of self.execute to reduce memory peak."""
+    import time
     try:
       _,kws=pickle.loads(argsin)
       self.context.update(kws)
-      exec(self.ccode, self.context)
     except:
       exc_typ,exc_val,exc_fr=sys.exc_info()
       l=traceback.format_exception(exc_typ,exc_val,exc_fr)
@@ -157,6 +157,7 @@ class PyScriptNode_i (Engines__POA.PyScriptNode,Generic):
   def executeSecond(self,outargsname):
     """ Same than second part of self.execute to reduce memory peak."""
     try:
+      exec(self.ccode, self.context)
       argsout=[]
       for arg in outargsname:
         if arg not in self.context: