From 0dd8bda7ed33ef43cb9127033559d33aa3706ef2 Mon Sep 17 00:00:00 2001 From: James Antill Date: Fri, 31 Oct 2025 15:59:15 -0400 Subject: [PATCH] updates+uptimes: Skip today backup in host output when today is identical. Signed-off-by: James Antill --- files/scripts/updates-uptime-cmd.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/files/scripts/updates-uptime-cmd.py b/files/scripts/updates-uptime-cmd.py index 0ed845f19c..477bec87f6 100755 --- a/files/scripts/updates-uptime-cmd.py +++ b/files/scripts/updates-uptime-cmd.py @@ -1557,9 +1557,13 @@ def _cmd_host(args): last_name = "main" last_data = list(sorted(filter_name_datas(fname_datas(), hosts))) + hbackups = list(reversed(backups)) + if len(hbackups) > 1 and _backup_today_identical(): + hbackups = hbackups[1:] + _max_update(last_data) if not conf_fast_width_history: - for backup in reversed(backups): + for backup in hbackups: data = filter_name_datas(lines2datas(bfname2lines(backup)), hosts) data = list(sorted(data)) _max_update(data) @@ -1572,7 +1576,7 @@ def _cmd_host(args): done = False skipped_num = 0 thostnum = 0 - for backup in reversed(backups): + for backup in hbackups: data = filter_name_datas(lines2datas(bfname2lines(backup)), hosts) data = list(sorted(data))