mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Fix preprocessor piping. Found by SungAli, diagnosed by SungAli and Sei Lisa.
This commit is contained in:
parent
cd9bfd426e
commit
6b2c5b7e39
1 changed files with 2 additions and 8 deletions
10
main.py
10
main.py
|
@ -469,14 +469,8 @@ def main():
|
|||
stdout = ''
|
||||
p = subprocess.Popen(preproc_cmdline, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE)
|
||||
p.stdin.write(script)
|
||||
p.stdin.close()
|
||||
while True:
|
||||
time.sleep(0.1)
|
||||
status = p.poll()
|
||||
stdout += p.stdout.read()
|
||||
if status is not None:
|
||||
break
|
||||
stdout = p.communicate(input=script)[0]
|
||||
status = p.wait()
|
||||
if status:
|
||||
return status
|
||||
script = stdout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue