wf: explicitly crash when temporary export files cannot be created (#45565)
This commit is contained in:
parent
c917bc1455
commit
6f763c4045
|
@ -69,8 +69,8 @@ try:
|
||||||
subprocess.check_call(['which', 'libreoffice'], stdout=subprocess.DEVNULL)
|
subprocess.check_call(['which', 'libreoffice'], stdout=subprocess.DEVNULL)
|
||||||
|
|
||||||
def transform_to_pdf(instream):
|
def transform_to_pdf(instream):
|
||||||
|
temp_dir = tempfile.mkdtemp()
|
||||||
try:
|
try:
|
||||||
temp_dir = tempfile.mkdtemp()
|
|
||||||
with tempfile.NamedTemporaryFile(dir=temp_dir) as infile:
|
with tempfile.NamedTemporaryFile(dir=temp_dir) as infile:
|
||||||
while True:
|
while True:
|
||||||
chunk = instream.read(100000)
|
chunk = instream.read(100000)
|
||||||
|
|
Loading…
Reference in New Issue