Factorio: Prevent pipes from breaking on invalid UTF-8 in client (#1078)

This commit is contained in:
recklesscoder 2022-10-09 04:10:22 +02:00 committed by GitHub
parent af6a72c3c3
commit 7b3ef012b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -211,6 +211,8 @@ async def game_watcher(ctx: FactorioContext):
def stream_factorio_output(pipe, queue, process):
pipe.reconfigure(errors="replace")
def queuer():
while process.poll() is None:
text = pipe.readline().strip()