]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Correct Python wrappings for SALOMEDS::TMPFile and Engines::TMPFile IDL types
authorvsr <vsr@opencascade.com>
Tue, 6 Nov 2018 07:42:46 +0000 (10:42 +0300)
committervsr <vsr@opencascade.com>
Tue, 6 Nov 2018 07:42:46 +0000 (10:42 +0300)
src/Container/SALOME_ComponentPy.py
src/SALOMEDS/SALOME_DriverPy.py

index 82d0400b99cad7e0ce16e95ea6f1b7965ec5bd12..4decad903cc7ff622eba3e9994458dfe8805b8cd 100755 (executable)
@@ -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)
 
     #-------------------------------------------------------------------------
 
index 9757721b6de3594a2a5dd9f9db7e1217e31bf54b..1b6d96b10e7e57d32dca6aeaab43264d38a6ab4f 100644 (file)
@@ -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