From c67e8c7b250df49a25bbe8dfd87f51dad3b82dc8 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 11 Jan 2024 12:59:12 +0100 Subject: [PATCH] [EDF29150] : WIP --- src/Container/SALOME_PyNode.py | 10 ++++++---- src/KERNEL_PY/__init__.py | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) 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 ) -- 2.39.2