From 8764993ca8f4c49e9115a82431facec577aba8a5 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 6 Nov 2018 10:42:46 +0300 Subject: [PATCH] Correct Python wrappings for SALOMEDS::TMPFile and Engines::TMPFile IDL types --- src/Container/SALOME_ComponentPy.py | 2 +- src/SALOMEDS/SALOME_DriverPy.py | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Container/SALOME_ComponentPy.py b/src/Container/SALOME_ComponentPy.py index 82d0400b9..4decad903 100755 --- a/src/Container/SALOME_ComponentPy.py +++ b/src/Container/SALOME_ComponentPy.py @@ -296,7 +296,7 @@ class SALOME_ComponentPy_i (Engines__POA.EngineComponent): aBuffer = "\0" if isMultiFile : aBuffer = "def RebuildData(): pass\n\0" - return (aBuffer, 1) + return (aBuffer.encode(), 1) #------------------------------------------------------------------------- diff --git a/src/SALOMEDS/SALOME_DriverPy.py b/src/SALOMEDS/SALOME_DriverPy.py index 9757721b6..1b6d96b10 100644 --- a/src/SALOMEDS/SALOME_DriverPy.py +++ b/src/SALOMEDS/SALOME_DriverPy.py @@ -41,7 +41,7 @@ class SALOME_DriverPy_i(SALOMEDS__POA.Driver): return theSObject.GetID() def LocalPersistentIDToIOR(self, theSObject, PersistentID, isMultiFile, isASCII): - return "" + return '' def ComponentDataType(self): return self._ComponentDataType @@ -50,10 +50,10 @@ class SALOME_DriverPy_i(SALOMEDS__POA.Driver): try: return self.getVersion() except: - return "" + return '' def Save(self, theComponent, theURL, isMultiFile): - return "" + return b'' def SaveASCII(self, theComponent, theURL, isMultiFile): return self.Save(theComponent, theURL, isMultiFile) @@ -74,5 +74,13 @@ class SALOME_DriverPy_i(SALOMEDS__POA.Driver): return None def CanCopy(self, theObject): - return 0 + return False + def CopyFrom(theObject, theObjectID): + return b'' + + def CanPaste(theComponentName, theObjectID): + return False + + def PasteInto(theStream, theObjectID, theObject): + return None -- 2.39.2