Fix empty progress log handling

This commit is contained in:
medimedi 2026-08-08 23:42:33 +08:00
parent dd79c643a9
commit 607d9750a4
1 changed files with 1 additions and 1 deletions

View File

@ -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)