From: Anthony Geay Date: Wed, 8 Apr 2020 04:45:47 +0000 (+0200) Subject: Move python code execution to second part X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=307a7501e084bac3c34c239694b4d48744eec4a3;p=modules%2Fkernel.git Move python code execution to second part --- diff --git a/src/Container/SALOME_PyNode.py b/src/Container/SALOME_PyNode.py index b74a7f2f7..fec7107ae 100644 --- a/src/Container/SALOME_PyNode.py +++ b/src/Container/SALOME_PyNode.py @@ -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: