From 73899b95d3ac90ed094a2a9f7e70417c36b25d2b Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Thu, 12 Apr 2012 07:17:50 +0200
Subject: [PATCH] fix a loop. Fixes #7142

---
 src/common/latex.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/common/latex.py b/src/common/latex.py
index 72daa2aafe..9a90fe8613 100644
--- a/src/common/latex.py
+++ b/src/common/latex.py
@@ -59,6 +59,7 @@ def check_blacklist(str_):
 
 def get_tmpfile_name():
     random.seed()
+    nb = 0
     while(nb < 100):
         int_ = random.randint(0, 10000)
         filename = os.path.join(gettempdir(), 'gajimtex_' + int_.__str__())
@@ -71,6 +72,7 @@ def get_tmpfile_name():
                 break
         if ok:
             return filename
+        nb += 1
     return filename
 
 def write_latex(filename, str_):
-- 
GitLab