Correctly close file opened by mkstemp. Fixes #37

This commit is contained in:
Yann Leboulanger
2012-10-29 14:05:54 +01:00
parent 94f544bdc5
commit 13550fb943
2 changed files with 2 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ class LatexRenderer(Thread):
try:
tmpdir = mkdtemp(prefix='gajim_tex')
tmpfd, tmppng = mkstemp(prefix='gajim_tex', suffix='.png')
tmpfd.close()
os.close(tmpfd)
except Exception:
msg = 'Could not create temporary files for Latex plugin'
log.debug(msg)