File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -399,13 +399,14 @@ def _start_frontend(self):
399399 )
400400
401401 def _wait_frontend (self ):
402+ if self .frontend_process is None or self .frontend_process .stdout is None :
403+ raise RuntimeError ("Frontend process has no stdout." )
404+ ansi_escape = re .compile (r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])" )
402405 while self .frontend_url is None :
403- line = (
404- self .frontend_process .stdout .readline () # pyright: ignore [reportOptionalMemberAccess]
405- )
406+ line = ansi_escape .sub ("" , self .frontend_process .stdout .readline ())
406407 if not line :
407408 break
408- print (repr ( line ) ) # for pytest diagnosis #noqa: T201
409+ print (line ) # for pytest diagnosis #noqa: T201
409410 m = re .search (reflex .constants .Next .FRONTEND_LISTENING_REGEX , line )
410411 if m is not None :
411412 self .frontend_url = m .group (1 )
You can’t perform that action at this time.
0 commit comments