From 65d667e60e698d61fd53ffbd2b0e5101e249af6a Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 21 Mar 2025 17:28:19 -0700 Subject: [PATCH] Revert "logreader: avoid repeated prompts in auto_strategy when rlogs are missing" (#34919) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "logreader: avoid repeated prompts in auto_strategy when rlogs are mis…" This reverts commit b8229ebca6b04903ac38eb5d60246dc7271687d2. --- tools/lib/logreader.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/lib/logreader.py b/tools/lib/logreader.py index df981c6184..9fe73825a8 100755 --- a/tools/lib/logreader.py +++ b/tools/lib/logreader.py @@ -119,14 +119,7 @@ def default_valid_file(fn: LogPath) -> bool: def auto_strategy(rlog_paths: list[LogPath], qlog_paths: list[LogPath], interactive: bool, valid_file: ValidFileCallable) -> list[LogPath]: # auto select logs based on availability - missing_rlogs = sum(rlog is None or not valid_file(rlog) for rlog in rlog_paths) - # If all rlogs are missing, check qlogs - if missing_rlogs == len(rlog_paths): - missing_qlogs = sum(qlog is None or not valid_file(qlog) for qlog in qlog_paths) - if missing_qlogs == len(qlog_paths): - # Neither rlogs nor qlogs are available, return rlog_paths as-is - return rlog_paths - + missing_rlogs = [rlog is None or not valid_file(rlog) for rlog in rlog_paths].count(True) if missing_rlogs != 0: if interactive: if input(f"{missing_rlogs}/{len(rlog_paths)} rlogs were not found, would you like to fallback to qlogs for those segments? (y/n) ").lower() != "y":