wf: explicitly crash when temporary export files cannot be created (#45565)

This commit is contained in:
Paul Marillonnet 2020-07-29 15:17:57 +02:00 committed by Frédéric Péters
parent c917bc1455
commit 6f763c4045
1 changed files with 1 additions and 1 deletions

View File

@ -69,8 +69,8 @@ try:
subprocess.check_call(['which', 'libreoffice'], stdout=subprocess.DEVNULL)
def transform_to_pdf(instream):
temp_dir = tempfile.mkdtemp()
try:
temp_dir = tempfile.mkdtemp()
with tempfile.NamedTemporaryFile(dir=temp_dir) as infile:
while True:
chunk = instream.read(100000)