Fix by Chris Petrilli (to his own code) to limit the number of

iterations looking for expansions to 10.
This commit is contained in:
Guido van Rossum 1999-02-12 14:13:10 +00:00
parent 561df24437
commit 72ce85823c
1 changed files with 3 additions and 1 deletions

View 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