From 9ed4521d6ebeee22c1f23270a1a471d0cae7b40e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 18 Apr 2012 00:14:11 +0200 Subject: [PATCH] cleanup temp file correctly --- src/common/latex.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/latex.py b/src/common/latex.py index cedf2f19b..6a8b08aae 100644 --- a/src/common/latex.py +++ b/src/common/latex.py @@ -166,6 +166,8 @@ def latex_to_image(str_): if exitcode == 0: os.rename(tmpfile + '.png', tmppng) + else: + os.remove(tmppng) os.rmdir(tmpdir)