Salome HOME
fix python3 and ElementTreePython3.py
[tools/sat.git] / commands / jobs.py
index 42b5c1a7a43bbbe2c40efe2025b5c9e00a88843d..c043d7048e094d8463f6f40b6f9f26b9a6c3c7dc 100644 (file)
@@ -26,9 +26,17 @@ import csv
 import shutil
 import itertools
 import re
-import paramiko
+
+# generate problem
+try:
+  import paramiko
+except:
+  paramiko = "import paramiko impossible"
+  pass
 
 import src
+
+
 import src.ElementTree as etree
 
 STYLESHEET_GLOBAL = "jobs_global_report.xsl"
@@ -825,8 +833,8 @@ class Jobs(object):
                 # the init command
                 (__, out_dist, __) = machine.exec_command(
                                 os.path.join(machine.sat_path,
-                                    "sat init --base unknown --workdir"
-                                    " unknown --log_dir unknown"),
+                                    "sat init --base default --workdir"
+                                    " default --log_dir default"),
                                 self.logger)
                 out_dist.read()    
                 
@@ -1797,7 +1805,9 @@ def run(args, runner, logger):
         files_to_copy.append(os.path.join(xsl_dir, "command.xsl"))
         files_to_copy.append(os.path.join(xsl_dir, "running.gif"))
         for file_path in files_to_copy:
-            shutil.copy2(file_path, log_dir)
+            # OP We use copy instead of copy2 to update the creation date
+            #    So we can clean the LOGS directories easily
+            shutil.copy(file_path, log_dir)
         
         # Instanciate the Gui in order to produce the xml files that contain all
         # the boards