]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
22587: [CEA 1166] Exception KeyError in module threading at Salome exit
authoreap <eap@opencascade.com>
Tue, 20 May 2014 10:22:11 +0000 (14:22 +0400)
committereap <eap@opencascade.com>
Tue, 20 May 2014 10:22:11 +0000 (14:22 +0400)
src/Container/Container_init_python.cxx
src/SALOMEDS/SALOMEDS_Driver_i.cxx

index a07b978f70b663e2a8eb5aa7f7fe29a41148b6b2..bc5e08baa1ad1e99b25749e74cfb8192d41c3855 100644 (file)
@@ -54,5 +54,6 @@ void KERNEL_PYTHON::init_python(int argc, char **argv)
   PySys_SetArgv(argc, argv);
   PyEval_InitThreads(); // Create (and acquire) the interpreter lock
   PyEval_ReleaseLock();  // Py_InitThreads acquires the GIL
+  PyRun_SimpleString("import threading\n");
 }
 
index 18bc5e7f19958ed1a127a36eeaf3aa7d92696aea..8dcb46a44fa1e38f1c9ecf7e0d623765562dfa93 100644 (file)
@@ -203,7 +203,8 @@ std::string SALOMEDS_Driver_i::IORToLocalPersistentID(const SALOMEDSImpl_SObject
   if ( !CORBA::is_nil(_driver) ) {
     CORBA::String_var pers_string =_driver->IORToLocalPersistentID(so.in(), IORString.c_str(),
                                                                    isMultiFile, isASCII);
-    pstr = pers_string;
+    if ( pers_string.in() )
+      pstr = pers_string;
   }
 
   so->UnRegister();