]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Replace exception by warning at wake up of an active session
authoradam <adam>
Thu, 24 Mar 2011 17:57:40 +0000 (17:57 +0000)
committeradam <adam>
Thu, 24 Mar 2011 17:57:40 +0000 (17:57 +0000)
bin/runSalome.py

index e6d0a239c8b3d70686985ee140cc6e281db9c1b8..7d220a7cdf69e23d066705d9d6df69c4c890a665 100755 (executable)
@@ -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