From: rnv Date: Fri, 5 Jun 2020 13:37:37 +0000 (+0300) Subject: Cosmetic changes. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7878b2224103b17b200d14e6566084494de9e311;p=modules%2Fkernel.git Cosmetic changes. --- diff --git a/src/KERNEL_PY/salome_iapp.py b/src/KERNEL_PY/salome_iapp.py index 083c5c73a..145e80b23 100644 --- a/src/KERNEL_PY/salome_iapp.py +++ b/src/KERNEL_PY/salome_iapp.py @@ -187,12 +187,15 @@ def salome_iapp_close(): def load_module(name, syncCall=True): - import salome_kernel - orb, lcc, naming_service, cm, esm, dsm = salome_kernel.salome_kernel_init() - session_server = naming_service.Resolve("/Kernel/Session") - if session_server: - message = "load_module/"+name - if syncCall: - session_server.emitMessage(message) - else: - session_server.emitMessageOneWay(message) \ No newline at end of file + try: + import salome + salome.salome_init() + session_server = salome.naming_service.Resolve("/Kernel/Session") + if session_server: + message = "load_module/"+name + if syncCall: + session_server.emitMessage(message) + else: + session_server.emitMessageOneWay(message) + except: + pass \ No newline at end of file