Skip to content

Commit 6c2c9dd

Browse files
committed
fix: handle ValueError in read_stdouts
1 parent df5291f commit 6c2c9dd

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

qui/updater/progress_page.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,13 @@ def handle_err_line(self, untrusted_line, rows):
231231

232232
def read_stdouts(self, proc, rows):
233233
curr_name_out = ""
234-
for untrusted_line in iter(
235-
proc.stdout.readline, "__COMMUNICATION_IS_DONE__"
236-
):
237-
if untrusted_line != "__COMMUNICATION_IS_DONE__":
234+
for untrusted_line in iter(proc.stdout.readline, ""):
235+
if untrusted_line:
238236
line = self._sanitize_line(untrusted_line)
239-
maybe_name, text = line.split(" ", 1)
237+
try:
238+
maybe_name, text = line.split(" ", 1)
239+
except ValueError:
240+
continue
240241
suffix = len(":out:")
241242
if maybe_name[:-suffix] in rows.keys():
242243
curr_name_out = maybe_name[:-suffix]

0 commit comments

Comments
 (0)