Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4cbd8a009e4f1756725cf570cd6c2df4 > files > 2

gajim-0.15-2.fc15.src.rpm

# HG changeset patch
# User Yann Leboulanger <asterix@lagaule.org>
# Date 1334207870 -7200
# Node ID f6f78f3802c07736cb63b3e696778dabe8263cbb
# Parent  ab4f06e5e024b0e1bb1aab3d4ec5f8a39c5d32aa
fix a loop. Fixes #7142

diff --git a/src/common/latex.py b/src/common/latex.py
--- a/src/common/latex.py
+++ b/src/common/latex.py
@@ -59,6 +59,7 @@
 
 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 @@
                 break
         if ok:
             return filename
+        nb += 1
     return filename
 
 def write_latex(filename, str_):