From c4544519f22d687da8b89618849e1adabc834cc1 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Tue, 16 Aug 2022 14:06:48 +0200 Subject: [PATCH] SSL porting for testbase cases --- src/PYCALCULATOR/PYCALCULATOR.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/PYCALCULATOR/PYCALCULATOR.py b/src/PYCALCULATOR/PYCALCULATOR.py index b84b590..96befc1 100644 --- a/src/PYCALCULATOR/PYCALCULATOR.py +++ b/src/PYCALCULATOR/PYCALCULATOR.py @@ -34,6 +34,7 @@ sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL) import PYCALCULATOR_ORB__POA import SALOME_ComponentPy +import SALOME_Embedded_NamingService_ClientPy import SALOME_MED from MEDCouplingClient import * @@ -58,8 +59,13 @@ class PYCALCULATOR(PYCALCULATOR_ORB__POA.PYCALCULATOR_Gen, SALOME_ComponentPy.SA instanceName, # component instance name interfaceName, # component interface name False) # notification flag (for notification server) - - self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i(self._orb) + + emb_ns = self._contId.get_embedded_NS_if_ssl() + import CORBA + if CORBA.is_nil(emb_ns): + self._naming_service = SALOME_ComponentPy.SALOME_NamingServicePy_i( self._orb ) + else: + self._naming_service = SALOME_Embedded_NamingService_ClientPy.SALOME_Embedded_NamingService_ClientPy(emb_ns) if verbose(): print("End of PYCALCULATOR::__init__") -- 2.39.2