]> SALOME platform Git repositories - plugins/ghs3dplugin.git/commitdiff
Salome HOME
#19896 [CEA] GHS3DPlugin_Hypothesis' object has no attribute 'SetPrintLogInFile' V9_6_0a2 V9_6_0b1
authorvsr <vsr@opencascade.com>
Thu, 8 Oct 2020 14:27:17 +0000 (17:27 +0300)
committervsr <vsr@opencascade.com>
Thu, 8 Oct 2020 14:27:17 +0000 (17:27 +0300)
 keep backward compatibility with deprecated API

src/GHS3DPlugin/GHS3DPluginBuilder.py

index 8beb2c003d89f720112cb6c11ea0f8fee8c5cd1a..35bb8b7cd5b0bdcf2f906b6792ac743fe6109e6b 100644 (file)
@@ -21,6 +21,7 @@
 # @package GHS3DPluginBuilder
 # Python API for the MG-Tetra meshing plug-in module.
 
+import omniORB
 from salome.smesh.smesh_algorithm import Mesh_Algorithm
 from salome.smesh.smeshBuilder import AssureGeomPublished
 
@@ -474,3 +475,17 @@ class GHS3D_Optimizer(GHS3D_Algorithm):
         pass
 
     pass # end of GHS3D_Optimizer class
+
+class hypoProxy(GHS3DPlugin._objref_GHS3DPlugin_Hypothesis):
+    """
+    Private class wrapping to provide backward compatibility with deprecated API.
+    """
+    def __init__(self, *args):
+        GHS3DPlugin._objref_GHS3DPlugin_Hypothesis.__init__(self, *args)
+    def __deepcopy__(self, memo=None):
+        new = self.__class__(self)
+        return new
+    def SetPrintLogInFile(self, value):
+        self.SetStandardOutputLog(not value)
+omniORB.registerObjref(GHS3DPlugin._objref_GHS3DPlugin_Hypothesis._NP_RepositoryId, hypoProxy)
+del hypoProxy