cleanup temp file correctly

This commit is contained in:
Yann Leboulanger 2012-04-18 00:14:11 +02:00
parent 40d5b2469d
commit 9ed4521d6e
1 changed files with 2 additions and 0 deletions

View File

@ -166,6 +166,8 @@ def latex_to_image(str_):
if exitcode == 0:
os.rename(tmpfile + '.png', tmppng)
else:
os.remove(tmppng)
os.rmdir(tmpdir)