From ed3a52895503868caaf03d632ec48960d40bcd88 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 24 Mar 2011 17:57:40 +0000 Subject: [PATCH] Replace exception by warning at wake up of an active session --- bin/runSalome.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/runSalome.py b/bin/runSalome.py index e6d0a239c..7d220a7cd 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -452,8 +452,20 @@ def startSalome(args, modules_list, modules_root_dir): session = clt.waitNS("/Kernel/Session",SALOME.Session) status = session.GetStatSession() if status.activeGUI: - msg = "Session GUI is already active" - raise Exception(msg) + from salome_utils import getPortNumber + port = getPortNumber() + msg = "Warning :" + msg += "\n" + msg += "Session GUI for port number %s is already active."%(port) + msg += "\n" + msg += "If you which to wake up another session," + msg += "\n" + msg += "please use variable OMNIORB_CONFIG" + msg += "\n" + msg += "to get the correct session object in naming service." + sys.stdout.write(msg+"\n") + sys.stdout.flush() + return clt session.GetInterface() return clt -- 2.39.2