From 61e20214ebd18d29aa482a8ca9bbd360114328fa Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 16 Aug 2024 12:21:45 +0200 Subject: [PATCH 1/2] Print last message --- planemo/galaxy/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/planemo/galaxy/config.py b/planemo/galaxy/config.py index adeb99670..9200dc420 100644 --- a/planemo/galaxy/config.py +++ b/planemo/galaxy/config.py @@ -209,6 +209,9 @@ def read_log(ctx, log_path, e: threading.Event): e.wait(1) finally: if log_fh: + log_lines = log_fh.read() + if log_lines: + ctx.log(log_lines) log_fh.close() From 79057a0236d97311c874cca7210194945b9867d2 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 16 Aug 2024 12:26:22 +0200 Subject: [PATCH 2/2] Fix random-ish newlines in planemo test output --- planemo/galaxy/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/planemo/galaxy/config.py b/planemo/galaxy/config.py index 9200dc420..c4b6480b3 100644 --- a/planemo/galaxy/config.py +++ b/planemo/galaxy/config.py @@ -205,13 +205,13 @@ def read_log(ctx, log_path, e: threading.Event): log_fh = open(log_path, "a+") log_lines = log_fh.read() if log_lines: - ctx.log(log_lines) + ctx.log(log_lines.rstrip()) e.wait(1) finally: if log_fh: log_lines = log_fh.read() if log_lines: - ctx.log(log_lines) + ctx.log(log_lines.rstrip()) log_fh.close()