Fix by Chris Petrilli (to his own code) to limit the number of
authorGuido van Rossum <guido@python.org>
Fri, 12 Feb 1999 14:13:10 +0000 (14:13 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 12 Feb 1999 14:13:10 +0000 (14:13 +0000)
iterations looking for expansions to 10.

Lib/ConfigParser.py

index bc646e41e2bc4e1b176eab14e6f77ae70572d1dd..dd8b6d866726300c035a17abab86967cc109ab55 100644 (file)
@@ -209,7 +209,9 @@ class ConfigParser:
             return rawval
 
         value = rawval                  # Make it a pretty variable name
-        while 1:                        # Loop through this until it's done
+        depth = 0                       
+        while depth < 10:               # Loop through this until it's done
+            depth = depth + 1
             if not string.find(value, "%("):
                 try:
                     value = value % d