8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-22 23:13:46 +00:00

Fix klafy horrors

This commit is contained in:
Hugo Levy-Falk 2019-11-17 11:58:23 +00:00 committed by root
parent 5a83a577fa
commit 09da1b4d43

View file

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