Oops forgot output sentinel when getting result from forked compiler

This commit is contained in:
Kovid Goyal 2019-09-29 20:38:33 +05:30
parent 7647c265e1
commit c67dacd033
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -242,7 +242,8 @@ def compile_pyj(data, filename='<stdin>', beautify=True, private_scope=True, lib
stdout = p.communicate(as_bytes(data))[0]
if p.wait() != 0:
raise SystemExit(p.returncode)
result = as_unicode(stdout)
idx = stdout.find(OUTPUT_SENTINEL)
result = as_unicode(stdout[idx+len(OUTPUT_SENTINEL):])
else:
c = compiler()
result = c(data, options)