From: Gilles DAVID Date: Thu, 27 Jul 2017 15:23:04 +0000 (+0200) Subject: Avoid using import CORBA X-Git-Tag: V8_4_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e039ef9105ae4f661c4774feaf7a995bc6b68ea2;p=modules%2Fkernel.git Avoid using import CORBA Prefer: "from omniORB import CORBA" --- diff --git a/bin/runConsole.py b/bin/runConsole.py index fe62b6895..9639291f7 100644 --- a/bin/runConsole.py +++ b/bin/runConsole.py @@ -131,7 +131,7 @@ def __get_running_session(requested_port=None, lastInstanceByDefault=False): return host, port, filename # -import CORBA +from omniORB import CORBA import CosNaming import orbmodule diff --git a/src/Communication_SWIG/libSALOME_Comm.i b/src/Communication_SWIG/libSALOME_Comm.i index 9a3c02114..7681ec35f 100644 --- a/src/Communication_SWIG/libSALOME_Comm.i +++ b/src/Communication_SWIG/libSALOME_Comm.i @@ -36,7 +36,7 @@ { PyObject* pdict = PyDict_New(); PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins()); - PyRun_String("import CORBA", Py_single_input, pdict, pdict); + PyRun_String("from omniORB import CORBA", Py_single_input, pdict, pdict); PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input, pdict, pdict); @@ -66,7 +66,7 @@ { PyObject* pdict = PyDict_New(); PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins()); - PyRun_String("import CORBA", Py_single_input, pdict, pdict); + PyRun_String("from omniORB import CORBA", Py_single_input, pdict, pdict); PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input, pdict, pdict); @@ -96,7 +96,7 @@ { PyObject* pdict = PyDict_New(); PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins()); - PyRun_String("import CORBA", Py_single_input, pdict, pdict); + PyRun_String("from omniORB import CORBA", Py_single_input, pdict, pdict); PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input, pdict, pdict); PyObject* orb = PyDict_GetItemString(pdict, "o"); @@ -114,7 +114,7 @@ { PyObject* pdict = PyDict_New(); PyDict_SetItemString(pdict, "__builtins__", PyEval_GetBuiltins()); - PyRun_String("import CORBA", Py_single_input, pdict, pdict); + PyRun_String("from omniORB import CORBA", Py_single_input, pdict, pdict); PyRun_String("o = CORBA.ORB_init([''], CORBA.ORB_ID);", Py_single_input, pdict, pdict); PyObject* orb = PyDict_GetItemString(pdict, "o"); diff --git a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py index 878797b5b..b0800d53d 100644 --- a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py +++ b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py @@ -47,7 +47,7 @@ except : print 'lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") failed' import sys -import CORBA +from omniORB import CORBA import CosNaming orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) obj = orb.resolve_initial_references("NameService")