From 07479f26ea7e0aa8ff7d8d9ab94fff7ba9aa2175 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 20 May 2014 14:22:11 +0400 Subject: [PATCH] 22587: [CEA 1166] Exception KeyError in module threading at Salome exit --- src/Container/Container_init_python.cxx | 1 + src/SALOMEDS/SALOMEDS_Driver_i.cxx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Container/Container_init_python.cxx b/src/Container/Container_init_python.cxx index a07b978f7..bc5e08baa 100644 --- a/src/Container/Container_init_python.cxx +++ b/src/Container/Container_init_python.cxx @@ -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"); } diff --git a/src/SALOMEDS/SALOMEDS_Driver_i.cxx b/src/SALOMEDS/SALOMEDS_Driver_i.cxx index 18bc5e7f1..8dcb46a44 100644 --- a/src/SALOMEDS/SALOMEDS_Driver_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Driver_i.cxx @@ -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(); -- 2.39.2