Salome HOME
Fix for ADAO case in SSL mode
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 27 Aug 2021 13:59:47 +0000 (15:59 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 27 Aug 2021 13:59:47 +0000 (15:59 +0200)
src/runtime/RuntimeSALOME.cxx
src/runtime/RuntimeSALOME.hxx
src/yacsloader/driver.cxx

index f50bfd298942ff24bdea65c7bb06c3690dfc1e2e..d41e67033d8f7176ac4a4dd74b899801f77815d7 100644 (file)
@@ -59,6 +59,7 @@
 #include "SalomeContainer.hxx"
 #include "CppContainer.hxx"
 #include "SalomeHPContainer.hxx"
+#include "PythonCppUtils.hxx"
 
 //Nodes
 #include "PythonNode.hxx"
@@ -248,6 +249,15 @@ RuntimeSALOME::~RuntimeSALOME()
     }
 }
 
+void RuntimeSALOME::loadModulCatalog()
+{
+  AutoGIL agil;
+  const char * SCRIPT = "from salome_kernel import list_of_catalogs_regarding_environement\n"
+"import KernelModuleCatalog\n"
+"KernelModuleCatalog.myModuleCatalog( list_of_catalogs_regarding_environement() )\n";
+  PyRun_SimpleString(SCRIPT);
+}
+
 //! CORBA and Python initialization
 /*!
  *  \param flags contains several bits
index f7c28b298330b60d4962e673fe8a2bc69a128672..c41f288571849d03514360ca7901aa03d748477b 100644 (file)
@@ -233,6 +233,8 @@ namespace YACS
 
       virtual ~RuntimeSALOME(); 
 
+      void loadModulCatalog();
+
       CORBA::ORB_ptr getOrb() const;
       PyObject * getPyOrb() const;
       PyObject * getBuiltins() const;
index 81919420e534e45f76d3fa0eea952709d3665d95..e579d97055d2fd2aeebef71a7c0c287af4759b92 100644 (file)
@@ -361,6 +361,7 @@ int main (int argc, char* argv[])
   try
     {
       YACS::ENGINE::RuntimeSALOME* runTime = YACS::ENGINE::getSALOMERuntime();
+      runTime->loadModulCatalog();
       CORBA::ORB_ptr orb = runTime->getOrb();
       if (orb)
         {