Salome HOME
Merge branch 'nct/jan21' of https://codev-tuleap.cea.fr/plugins/git/salome/sat into...
[tools/sat.git] / commands / job.py
index f27f7e733363ba4b6dde398d9517f092f75fa878..f5805feaa557dcaf65007cdf09ed75c8a5f1ef6d 100644 (file)
@@ -19,7 +19,7 @@
 import os
 
 import src
-import salomeTools
+import src.salomeTools
 
 # Define all possible option for the make command :  sat make <options>
 parser = src.options.Options()
@@ -35,9 +35,12 @@ def description():
     :return: The text to display for the job command description.
     :rtype: str
     '''
-    return _("Executes the commands of the job defined"
-             " in the jobs configuration file\n\nexample:\nsat job "
-             "--jobs_config my_jobs --name my_job")
+    return _("""\
+The job command executes the commands of the job defined in the jobs configuration file
+
+example:
+>> sat job --jobs_config my_jobs --name my_job
+""")
   
 def run(args, runner, logger):
     '''method that is called when salomeTools is called with job parameter.
@@ -114,7 +117,7 @@ def run(args, runner, logger):
         cmd_exe = command.split(" ")[0] # first part
         if cmd_exe == "sat":
             # use the salomeTools parser to get the options of the command
-            sat_parser = salomeTools.parser
+            sat_parser = src.salomeTools.parser
             input_parser = src.remove_item_from_list(command.split(' ')[1:], "")
             (options, argus) = sat_parser.parse_args(input_parser)
             # Verify if there is a changed option
@@ -127,8 +130,7 @@ def run(args, runner, logger):
             end_cmd = " ".join(argus[1:])
         else:
             sat_command_name = "shell"
-            end_cmd = "--command " + command
-        
+            end_cmd = ["--command", command]
         # Do not change the options if no option was called in the command
         if not(specific_option):
             options = None