Salome HOME
Add the option --no_browser to the log command in order to only update the hat file...
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Wed, 23 Nov 2016 08:25:18 +0000 (09:25 +0100)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Wed, 23 Nov 2016 08:25:18 +0000 (09:25 +0100)
commands/log.py
complete_sat.sh

index 6931026736bbc25f0d72eb14c257f49bc7895d81..edd425b92092490571d345172f6d22145f4a8480 100644 (file)
@@ -40,6 +40,9 @@ parser.add_option('f', 'full', 'boolean', 'full', "Optional: Show the logs of "
                   "ALL the launched commands.")
 parser.add_option('c', 'clean', 'int', 'clean', "Optional: Erase the n most "
                   "ancient log files.")
+parser.add_option('n', 'no_browser', 'boolean', 'no_browser', "Optional: Do not"
+                  " launch the browser at the end of the command. Only update "
+                  "the hat file.")
 
 def get_last_log_file(logDir, notShownCommands):
     '''Used in case of last option. Get the last log command file path.
@@ -258,6 +261,7 @@ def run(args, runner, logger):
     logger.write("\n", 3)
     
     # open the hat xml in the user editor
-    logger.write(_("\nOpening the log file\n"), 3)
-    src.system.show_in_editor(runner.cfg.USER.browser, xmlHatFilePath, logger)
+    if not options.no_browser:
+        logger.write(_("\nOpening the log file\n"), 3)
+        src.system.show_in_editor(runner.cfg.USER.browser, xmlHatFilePath, logger)
     return 0
\ No newline at end of file
index 8f378952007fe0654956be1d34bc5b006c6d6419..1da08972e11c4461a3d2f52e183fd3ca30c112d0 100755 (executable)
@@ -32,7 +32,7 @@ _show_applications()
             opts2=$(echo --list --value --edit --info $opts2)
             ;;
         log)
-            opts2=$(echo --clean --full --last --terminal $opts2)
+            opts2=$(echo --clean --full --last --terminal --no_browser $opts2)
             ;;
         jobs)
             opts2=$(echo --name --only_jobs --list --completion --test_connection --input_boards --publish $opts2)
@@ -159,7 +159,7 @@ _salomeTools_complete()
             return 0        
             ;;
         log)
-            opts="--clean --last --terminal --last"
+            opts="--clean --last --terminal --last --no_browser"
             COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
             return 0
             ;;