Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions sdk/python/packages/flet-cli/src/flet_cli/commands/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,13 @@ def on_any_event(self, event):

def print_output(self, p):
while True:
line = p.stdout.readline()
if not line:
raw = p.stdout.readline()
if not raw:
break
line = line.rstrip("\r\n")

line = raw.decode("utf-8", errors="replace") if isinstance(raw, bytes) else raw
line = line.rstrip("\r\n")

if line.startswith(self.page_url_prefix):
if not self.page_url:
self.page_url = line[len(self.page_url_prefix) + 1 :]
Expand Down