From: Anthony Geay Date: Thu, 11 Jan 2024 11:59:12 +0000 (+0100) Subject: [EDF29150] : WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c67e8c7b250df49a25bbe8dfd87f51dad3b82dc8;p=modules%2Fkernel.git [EDF29150] : WIP --- diff --git a/src/Container/SALOME_PyNode.py b/src/Container/SALOME_PyNode.py index ab91c1bfa..eea690050 100644 --- a/src/Container/SALOME_PyNode.py +++ b/src/Container/SALOME_PyNode.py @@ -168,15 +168,17 @@ def DumpInFile(obj,fname): f.write( obj ) def IncrRefInFile(fname): - with open(fname,"rb") as f: + pass + """with open(fname,"rb") as f: cntb = f.read( GetSizeOfTCnt() ) cnt = TypeCounter.from_buffer_copy( cntb ).value with open(fname,"rb+") as f: #import KernelServices ; KernelServices.EntryForDebuggerBreakPoint() - f.write( bytes( TypeCounter(cnt+1) ) ) + f.write( bytes( TypeCounter(cnt+1) ) )""" def DecrRefInFile(fname): - import os + pass + """import os with open(fname,"rb") as f: cntb = f.read( GetSizeOfTCnt() ) cnt = TypeCounter.from_buffer_copy( cntb ).value @@ -186,7 +188,7 @@ def DecrRefInFile(fname): os.unlink( fname ) else: with open(fname,"rb+") as f: - f.write( bytes( TypeCounter(cnt-1) ) ) + f.write( bytes( TypeCounter(cnt-1) ) )""" def GetBigObjectOnDiskThreshold(): import os diff --git a/src/KERNEL_PY/__init__.py b/src/KERNEL_PY/__init__.py index 81f53a391..025878f45 100644 --- a/src/KERNEL_PY/__init__.py +++ b/src/KERNEL_PY/__init__.py @@ -553,7 +553,6 @@ def LogManagerLoadFromIORFile( iorFile ): global orb def LoadAndWrite(logm,tempFileName): import SALOME_PyNode - print( tempFileName ) logm.putStructInFileAtomic( False, tempFileName ) tempFileAuto = SALOME_PyNode.FileDeleter( tempFileName ) ret = LogManagerLoadFromFile( tempFileAuto.filename )