]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
Artifact 8916 : Replace shutils.copy2(...) by shutils.copy(...) for stylesheets 5.0.0b3
authorSPN Salome - CEA <support-salome@cea.fr>
Mon, 4 Dec 2017 15:37:02 +0000 (16:37 +0100)
committerSPN Salome - CEA <support-salome@cea.fr>
Mon, 4 Dec 2017 15:37:02 +0000 (16:37 +0100)
commands/jobs.py
commands/log.py

index 15d33f85a90a6b633df69e15ab3c5257b7a9ffce..3d6540e6cd0bbec69645ec9f42fed1d6cc4150c1 100644 (file)
@@ -1797,7 +1797,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
index 08e5f23915a38908f8edde5a9f32aa72881dbb35..01164bf5033bebb5c5ff8e6c350ffa28afcc6083 100644 (file)
@@ -257,11 +257,13 @@ def run(args, runner, logger):
     imgLogo = os.path.join(xslDir, "LOGO-SAT.png")
     
     # copy the stylesheets in the log directory
-    shutil.copy2(xslCommand, logDir)
-    shutil.copy2(xslHat, logDir)
+    # OP We use copy instead of copy2 to update the creation date
+    #    So we can clean the LOGS directories easily
+    shutil.copy(xslCommand, logDir)
+    shutil.copy(xslHat, logDir)
     src.ensure_path_exists(os.path.join(logDir, "TEST"))
-    shutil.copy2(xsltest, os.path.join(logDir, "TEST"))
-    shutil.copy2(imgLogo, logDir)
+    shutil.copy(xsltest, os.path.join(logDir, "TEST"))
+    shutil.copy(imgLogo, logDir)
 
     # If the last option is invoked, just, show the last log file
     if options.last_terminal:
@@ -332,4 +334,4 @@ def run(args, runner, 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
+    return 0