From 287df1b8c6a2004e48981614d75ec1a23bbf88d0 Mon Sep 17 00:00:00 2001 From: Balazs Szenczy Date: Thu, 31 Oct 2024 11:11:40 +0100 Subject: [PATCH] spaces --- good-try.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/good-try.py b/good-try.py index 6f3e5085..6c8cd1e7 100644 --- a/good-try.py +++ b/good-try.py @@ -70,7 +70,7 @@ def extract_latency(line): if not os.path.exists('the_path.py'): exit("** the_path module is not available") -test_set=the_path.test_set +test_set = the_path.test_set test_set_unique = list(set(item[0] for item in test_set)) # Checking all the topo files if they have all the edges @@ -120,17 +120,17 @@ def extract_latency(line): config['api'] = test_set[topo_idx][1] print(f"** Sorting out the config {topofile} with {config['mode']} and {config['api']}") - baseline_clk_str="" - baseline_tls_str="" - baseline_path_clk_str="" + baseline_clk_str = "" + baseline_tls_str = "" + baseline_path_clk_str = "" if config['mode'] in ['clock', 'clockr']: - baseline_clk_str=f"--{config['mode']}" - baseline_path_clk_str="clocked_" + baseline_clk_str = f"--{config['mode']}" + baseline_path_clk_str = "clocked_" if forklift_certified: - baseline_tls_str="--tls-verify" + baseline_tls_str = "--tls-verify" baseline_path = os.path.join('measurements', f"assumed_{baseline_path_clk_str}baseline_{current_time1}.txt") - based_line=0.0 + based_line = 0.0 if not no_based_line: subprocess.call(['sudo', 'python', 'base_try.py', '--filename', f"{current_time1}",'--track',f"{config['first_hop_relay'][0]['track']}"] + ([baseline_clk_str] if baseline_clk_str else []) + ([baseline_tls_str] if baseline_tls_str else [])) with open(baseline_path, 'r') as file: @@ -195,7 +195,7 @@ def extract_latency(line): relays = [] pubs = [] subs= [] - k=1 + k = 1 # ** Creating hosts @@ -521,7 +521,7 @@ def get_video_duration(file_path): file.write('\n'.join(interfaces)) # publisher side division for multiple subscribers - # from the topo we change the diver at the publisher to the number of subscribers of that track + # from the topo we change the divider at the publisher to the number of subscribers of that track # this because after the calc we will multiple by the link length which contains publisher relays # transmitting interfaces already as many times as many subscribers are. divider = 1