From 5e9f26589f8a0c52ae13e7bed1bd75ccf7ed9049 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 18 May 2015 17:44:51 +0200 Subject: [PATCH] Do not systematically kill salome session at exit. --- bin/appliskel/salome_tester/salome_test_session.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/appliskel/salome_tester/salome_test_session.py b/bin/appliskel/salome_tester/salome_test_session.py index 8f193f572..5bb4682f5 100644 --- a/bin/appliskel/salome_tester/salome_test_session.py +++ b/bin/appliskel/salome_tester/salome_test_session.py @@ -24,7 +24,7 @@ import os # args=["--gui", "--show-desktop=1", "--splash=0"] # args=["--terminal","--modules=MED,PARAVIS,GUI"] class SalomeSession(object): - def __init__(self, args=[]): + def __init__(self, args=[], shutdownAtExit=True): sys.argv = ['runSalome'] + args if "INGUI" in args: @@ -36,7 +36,8 @@ class SalomeSession(object): #sys.argv += ["--embedded=SalomeAppEngine,cppContainer,registry,moduleCatalog"] else: sys.argv += ["--terminal"] - sys.argv += ["--shutdown-servers=1"] + if shutdownAtExit: + sys.argv += ["--shutdown-servers=1"] #sys.argv += ["--modules=MED,PARAVIS,GUI"] pass @@ -49,12 +50,12 @@ class SalomeSession(object): # # Run SALOME -def startSession(): +def startSession(shutdownAtExit=True): import tempfile log = tempfile.NamedTemporaryFile(suffix='_nsport.log', delete=False) log.close() import salome - salome_session = SalomeSession(args=["--ns-port-log=%s"%log.name]) + salome_session = SalomeSession(args=["--ns-port-log=%s"%log.name],shutdownAtExit=shutdownAtExit) salome.salome_init() session_server = salome.naming_service.Resolve('/Kernel/Session') if session_server: -- 2.39.2