]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fixed problem with loading python modules
authorimn <imn@opencascade.com>
Mon, 19 Dec 2016 14:39:38 +0000 (17:39 +0300)
committerimn <imn@opencascade.com>
Mon, 19 Dec 2016 14:53:10 +0000 (17:53 +0300)
src/Container/Container_i.cxx
src/Container/SALOME_ContainerPy.py

index 085651006f9a9c1b943cc7ec5239290f3f500c65..06cd2c382b5aefa320d67f5afbd25f9348aec204 100644 (file)
@@ -928,7 +928,7 @@ Engines_Container_i::createPythonInstance(std::string CompName,
   PyGILState_STATE gstate = PyGILState_Ensure();
   PyObject *result = PyObject_CallMethod(_pyCont,
                                          (char*)"create_component_instance",
-                                         (char*)"ssl",
+                                         (char*)"ss",
                                          CompName.c_str(),
                                          instanceName.c_str());
   const char *ior;
@@ -967,10 +967,9 @@ Engines_Container_i::create_python_service_instance(const char * CompName,
   PyGILState_STATE gstate = PyGILState_Ensure();
   PyObject *result = PyObject_CallMethod(_pyCont,
                                          (char*)"create_component_instance",
-                                         (char*)"ssl",
+                                         (char*)"ss",
                                          CompName,
-                                         instanceName.c_str(),
-                                         0);
+                                         instanceName.c_str());
   const char *ior;
   const char *error;
   PyArg_ParseTuple(result,"ss", &ior, &error);
index 3a8b2bf4043874c53e5fc93bce6bdd486214617c..69316736f912bd52a2b1d5d82c9231ba7e40f24b 100755 (executable)
@@ -244,7 +244,7 @@ class SALOME_ContainerPy_i (Engines__POA.Container):
     #-------------------------------------------------------------------------
 
     def create_python_service_instance(self, CompName):
-        return self.create_component_instance(CompName, 0)
+        return self.create_component_instance(CompName)
       
     #-------------------------------------------------------------------------