From: Serge Rehbinder Date: Wed, 23 Nov 2016 08:25:18 +0000 (+0100) Subject: Add the option --no_browser to the log command in order to only update the hat file... X-Git-Tag: 5.0.0a1~38^2~60 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c686d31938c08991b365b08ae1039d28c2e76dc;p=tools%2Fsat.git Add the option --no_browser to the log command in order to only update the hat file and not launch the browser at the end of the command --- diff --git a/commands/log.py b/commands/log.py index 6931026..edd425b 100644 --- a/commands/log.py +++ b/commands/log.py @@ -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 diff --git a/complete_sat.sh b/complete_sat.sh index 8f37895..1da0897 100755 --- a/complete_sat.sh +++ b/complete_sat.sh @@ -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 ;;