cleanup temp file correctly
This commit is contained in:
parent
40d5b2469d
commit
9ed4521d6e
|
@ -166,6 +166,8 @@ def latex_to_image(str_):
|
||||||
|
|
||||||
if exitcode == 0:
|
if exitcode == 0:
|
||||||
os.rename(tmpfile + '.png', tmppng)
|
os.rename(tmpfile + '.png', tmppng)
|
||||||
|
else:
|
||||||
|
os.remove(tmppng)
|
||||||
|
|
||||||
os.rmdir(tmpdir)
|
os.rmdir(tmpdir)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue