mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +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 = ''
|
stdout = ''
|
||||||
p = subprocess.Popen(preproc_cmdline, stdin=subprocess.PIPE,
|
p = subprocess.Popen(preproc_cmdline, stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
p.stdin.write(script)
|
stdout = p.communicate(input=script)[0]
|
||||||
p.stdin.close()
|
status = p.wait()
|
||||||
while True:
|
|
||||||
time.sleep(0.1)
|
|
||||||
status = p.poll()
|
|
||||||
stdout += p.stdout.read()
|
|
||||||
if status is not None:
|
|
||||||
break
|
|
||||||
if status:
|
if status:
|
||||||
return status
|
return status
|
||||||
script = stdout
|
script = stdout
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue