From 54e5fabd4996149e8b5573d55c38c79baa8ee0f8 Mon Sep 17 00:00:00 2001 From: Maria Mirkina Date: Tue, 24 Oct 2023 12:46:14 +0100 Subject: [PATCH] Removed links in power experiments(#27) --- base_loadgen_program/code_axs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base_loadgen_program/code_axs.py b/base_loadgen_program/code_axs.py index 662d5d4..371a31d 100644 --- a/base_loadgen_program/code_axs.py +++ b/base_loadgen_program/code_axs.py @@ -53,8 +53,7 @@ def link_to_power_client_entry(output_entry, symlink_to, power_client_entrydic_p power_client_entry_path = os.path.dirname( symlink_to ) - if os.path.exists( symlink_to ): - os.unlink( symlink_to ) + if os.path.exists(power_client_entrydic_path ): entrydic = load_json( power_client_entrydic_path ) logs_name = "testing_logs" @@ -71,7 +70,8 @@ def link_to_power_client_entry(output_entry, symlink_to, power_client_entrydic_p entrydic[entry_name_dict] = power_workload_entry_name save_json( entrydic, power_client_entrydic_path, indent=4 ) - os.symlink( power_workload_path, os.path.join(power_client_entry_path, logs_name ), target_is_directory=True ) + if os.path.exists( symlink_to ): + os.unlink( symlink_to ) os.symlink( power_workload_path, symlink_to, target_is_directory=True ) return output_entry