]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix for salome_init called from embedded python. omu/launcher_ssl
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 23 Aug 2021 15:13:30 +0000 (17:13 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 23 Aug 2021 15:13:30 +0000 (17:13 +0200)
src/KERNEL_PY/__init__.py

index d0d611d8ea75bf7ce3d94fb5cb5659adf98684d3..0f7bee48c518b70738e7c6cfcfee834e8800ede9 100644 (file)
@@ -239,7 +239,11 @@ def salome_init_without_session():
     # activate poaManager to accept co-localized CORBA calls.
     from KernelSDS import GetDSMInstance
     import sys
-    dsm = GetDSMInstance(sys.argv)
+    if hasattr(sys, 'argv'):
+      argv = sys.argv
+    else:
+      argv = ['']
+    dsm = GetDSMInstance(argv)
     # esm inherits from SALOME_CPythonHelper singleton already initialized by GetDSMInstance
     # esm inherits also from SALOME_ResourcesManager creation/initialization (concerning SingleThreadPOA POA) when KernelLauncher.GetContainerManager() has been called
     esm = KernelLauncher.GetExternalServer()