8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-07-06 22:24:06 +00:00

Merge branch 'fix_debug_remains' into 'dev'

Fix klafy horrors

See merge request federez/re2o!470
This commit is contained in:
chirac 2019-11-17 13:06:52 +01:00
commit af05df6c85

View file

@ -110,13 +110,12 @@ def create_pdf(template, ctx={}):
with tempfile.TemporaryDirectory() as tempdir: with tempfile.TemporaryDirectory() as tempdir:
for _ in range(2): for _ in range(2):
with open("/var/www/re2o/out.log", "w") as f: process = Popen(
process = Popen( ["pdflatex", "-output-directory", tempdir],
["pdflatex", "-output-directory", tempdir], stdin=PIPE,
stdin=PIPE, stdout=PIPE,
stdout=f, # PIPE, )
) process.communicate(rendered_tpl)
process.communicate(rendered_tpl)
with open(os.path.join(tempdir, "texput.pdf"), "rb") as f: with open(os.path.join(tempdir, "texput.pdf"), "rb") as f:
pdf = f.read() pdf = f.read()