]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Cosmetic changes.
authorrnv <rnv@opencascade.com>
Fri, 5 Jun 2020 13:37:37 +0000 (16:37 +0300)
committerrnv <rnv@opencascade.com>
Fri, 5 Jun 2020 13:37:37 +0000 (16:37 +0300)
src/KERNEL_PY/salome_iapp.py

index 083c5c73a4d9fe567d2824aa441c5914bff3f586..145e80b230a6be951c27df2b63ffae32ce6109d6 100644 (file)
@@ -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