From 981ea88fa8af284306e0d1e1f7aed0525b2e1c0a Mon Sep 17 00:00:00 2001 From: Christoph Lehmann Date: Tue, 6 Aug 2024 08:12:58 +0200 Subject: [PATCH] [scr] Only print blank line as separator if reasonable --- Applications/Python/ogs/dev/ogs_log_summary.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Applications/Python/ogs/dev/ogs_log_summary.py b/Applications/Python/ogs/dev/ogs_log_summary.py index 8297452cb1f..3b442fa5de5 100755 --- a/Applications/Python/ogs/dev/ogs_log_summary.py +++ b/Applications/Python/ogs/dev/ogs_log_summary.py @@ -271,9 +271,13 @@ def aggregate_log_files(log_files_dirs): def run(log_files_dirs, xml_out_dir, verbose): map_prj_file_to_agg_vtkdiff_stats = aggregate_log_files(log_files_dirs) - for prj_file, df_vtkdiff_max in map_prj_file_to_agg_vtkdiff_stats.items(): + for i, (prj_file, df_vtkdiff_max) in enumerate( + map_prj_file_to_agg_vtkdiff_stats.items() + ): if verbose: - print(f"\n###### {prj_file}\n") + if i != 0: + print() # blank line as a separator + print(f"###### {prj_file}\n") df_vtkdiff_max = round_up_2_digits(df_vtkdiff_max) # noqa: PLW2901