From 5368a89deb5b78d7fe7ccd456bc77c731aca5b7b Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 8 Oct 2020 17:27:17 +0300 Subject: [PATCH] #19896 [CEA] GHS3DPlugin_Hypothesis' object has no attribute 'SetPrintLogInFile' keep backward compatibility with deprecated API --- src/GHS3DPlugin/GHS3DPluginBuilder.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/GHS3DPlugin/GHS3DPluginBuilder.py b/src/GHS3DPlugin/GHS3DPluginBuilder.py index 8beb2c0..35bb8b7 100644 --- a/src/GHS3DPlugin/GHS3DPluginBuilder.py +++ b/src/GHS3DPlugin/GHS3DPluginBuilder.py @@ -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 -- 2.30.2