From 607d9750a472eef6c89a3334e6c6c411f45ba203 Mon Sep 17 00:00:00 2001 From: medimedi Date: Sat, 8 Aug 2026 23:42:33 +0800 Subject: [PATCH] Fix empty progress log handling --- app/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/logger.py b/app/logger.py index fe82c40c9..4168e2ed0 100644 --- a/app/logger.py +++ b/app/logger.py @@ -64,7 +64,7 @@ class LogInterceptor(io.TextIOWrapper): # Simple handling for cr to overwrite the last output if it isnt a full line # else logs just get full of progress messages - if isinstance(data, str) and data.startswith("\r") and not logs[-1]["m"].endswith("\n"): + if isinstance(data, str) and data.startswith("\r") and logs and not logs[-1]["m"].endswith("\n"): logs.pop() logs.append(entry) super().write(data)