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)