]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Add sessionless option to salome command. omu/noserver
authorOvidiu MIRCESCU <ovidiu.mircescu@edf.fr>
Thu, 15 Jul 2021 10:35:03 +0000 (12:35 +0200)
committerOvidiu MIRCESCU <ovidiu.mircescu@edf.fr>
Thu, 15 Jul 2021 10:35:03 +0000 (12:35 +0200)
bin/runSalomeNoServer.py
bin/salomeContext.py

index 6e6ee91f824de76a26105a3fd08d0f0b28b9d10e..0305716a8d074cebb2add6b4599f58ef6f55aaaa 100755 (executable)
@@ -31,8 +31,11 @@ class NoSessionServer(runSalome.SessionServer):
         SalomeAppSLConfig=os.getenv("SalomeAppConfig","")
         os.putenv("SalomeAppSLConfig", SalomeAppSLConfig)
 
-if __name__ == "__main__":
+def main():
     args, modules_list, modules_root_dir = setenv.get_config()
     mySessionServ = NoSessionServer(args, modules_list, modules_root_dir)
     mySessionServ.setpath(modules_list, modules_root_dir)
     mySessionServ.run()
+
+if __name__ == "__main__":
+    main()
index d4d44afdd8ed3cf77c908e2eeea9f98302144f9c..32543205e09685d7d3ac0e61f186233d0f8abf8d 100755 (executable)
@@ -224,6 +224,7 @@ class SalomeContext:
 
     availableCommands = {
       'start'   : '_runAppli',
+      'sessionless' : '_sessionless',
       'context' : '_setContext',
       'shell'   : '_runSession',
       'remote'  : '_runRemote',
@@ -358,6 +359,14 @@ class SalomeContext:
     return 0
   #
 
+  def _sessionless(self, args=None):
+    if args is None:
+      args = []
+    sys.argv = ['runSalome'] + args
+    import runSalomeNoServer
+    runSalomeNoServer.main()
+  #
+
   def _setContext(self, args=None):
     salome_context_set = os.getenv("SALOME_CONTEXT_SET")
     if salome_context_set: