From 307a7501e084bac3c34c239694b4d48744eec4a3 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 8 Apr 2020 06:45:47 +0200 Subject: [PATCH] Move python code execution to second part --- src/Container/SALOME_PyNode.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: -- 2.39.2