Skip to content

Commit

Permalink
copying instead of reading-writing
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 26, 2024
1 parent 4691c1e commit 00f17d0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions contrib/slurm/arrayexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,10 +569,7 @@ def get_run_result(tempdir, run, result_files_patterns):
if "terminationreason" in data_dict:
ret["terminationreason"] = data_dict["terminationreason"]

with open(run.log_file, "w+") as file:
with open(tmp_log, "r") as log_source:
content = log_source.read()
file.write(content)
shutil.copy(tmp_log, run.log_file)

if os.path.exists(tempdir):
os.makedirs(run.result_files_folder, exist_ok=True)
Expand Down

0 comments on commit 00f17d0

Please sign in to comment.