From a5a3bb86d8228dd1ac36d87ce55424735ad0f4c1 Mon Sep 17 00:00:00 2001 From: Elmar <2+elmar@noreply.git.ask-meyer.ch> Date: Wed, 4 Nov 2026 21:53:42 +0100 Subject: [PATCH] Update task-pipeline.py --- task-pipeline.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/task-pipeline.py b/task-pipeline.py index bf84b3c..e3d5153 100644 --- a/task-pipeline.py +++ b/task-pipeline.py @@ -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: