Update task-pipeline.py

This commit is contained in:
2026-11-04 21:53:42 +01:00
parent 69b6032c64
commit a5a3bb86d8
+15 -13
View File
@@ -1155,35 +1155,37 @@ class PipelineGUI:
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding="utf-8",
bufsize=0,
env=env
)
current_line = ""
current_line = b""
aborted = False
while True:
ch = proc.stdout.read(1)
if isinstance(ch, bytes):
ch = ch.decode("utf-8", errors="replace")
if not ch and proc.poll() is not None:
c = proc.stdout.read(1)
if not c:
break
if ch == "\r":
if c == b"\r":
current_line = current_line.decode("utf-8", errors="replace")
start = self.log.index("end-1c linestart")
self.log.config(state=tk.NORMAL)
self.log.delete(start, "end-1c")
self.log.insert(start, current_line)
self.log.config(state=tk.DISABLED)
self.log.see(tk.END)
current_line = ""
elif ch == "\n":
current_line = b""
elif c == b"\n":
current_line = current_line.decode("utf-8", errors="replace")
self.log.config(state=tk.NORMAL)
self.log.insert(tk.END, current_line + "\n")
self.log.config(state=tk.DISABLED)
self.log.see(tk.END)
current_line = ""
current_line = b""
else:
current_line += ch
current_line += c
# Prüfen, ob sich Sources geändert haben
if sources_dict: