Skip to content

Commit 578ee50

Browse files
author
Anthony Geay
committed
[EDF30758] : Fix missing destruction of execsafe py file in stateless mode context
1 parent ee02d41 commit 578ee50

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Container/SALOME_PyNode.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ def replayCmd(self):
912912
@property
913913
def cleanOperations(self):
914914
import os
915-
return "To clean files : ( cd {} && rm {} )".format( os.path.dirname(self._main_filename)," ".join( [os.path.basename(self._main_filename),self._code_filename,self._in_context_filename] ) )
915+
return "To clean files : ( cd {} && rm {} )".format( os.path.dirname(self._main_filename)," ".join( [os.path.basename(self._main_filename),os.path.basename(self._code_filename),os.path.basename(self._in_context_filename)] ) )
916916

917917
def strDependingOnReturnCode(self, keepFilesToReplay, returnCode):
918918
if returnCode == -1:
@@ -1000,7 +1000,8 @@ def RetrieveUniquePartFromPfx( fname ):
10001000
sys.stderr.write({!r})
10011001
sys.stderr.flush()""".format( MY_KEY_TO_DETECT_FINISH ) )
10021002
codeFd.flush()
1003-
codeFileName = os.path.basename( codeFd.name )
1003+
codeFileNameFull = codeFd.name
1004+
codeFileName = os.path.basename( codeFileNameFull )
10041005
contextFileName = os.path.join( dirForReplayFiles, "contextsafe_{}.pckl".format( RetrieveUniquePartFromPfx( codeFileName ) ) )
10051006
with open(contextFileName,"wb") as contextFd:
10061007
pickle.dump( context, contextFd)
@@ -1016,7 +1017,7 @@ def RetrieveUniquePartFromPfx( fname ):
10161017
returnCode = p.returncode
10171018
if returnCode == 0:
10181019
break
1019-
return returnCode, stdout, stderr, PythonFunctionEvaluatorParams(mainExecFileName,codeFileName,contextFileName,resFileName)
1020+
return returnCode, stdout, stderr, PythonFunctionEvaluatorParams(mainExecFileName,codeFileNameFull,contextFileName,resFileName)
10201021
ret = instanceOfLogOfCurrentSession._current_instance
10211022
returnCode, stdout, stderr, evParams = InternalExecResistant( code, context, outargsname )
10221023
stdout = stdout.decode()

0 commit comments

Comments
 (0)