summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-13 12:36:24 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-13 12:36:24 (GMT)
commit73709e62ff97c822aa644eec4104c21e530815c5 (patch)
treeecae4796eccc72c948f66fcdafeb2afb3574c97f /Lib/ConfigParser.py
parent456cb1e694d6fb5573320f77384b3cb03fee910c (diff)
downloadcpython-73709e62ff97c822aa644eec4104c21e530815c5.zip
cpython-73709e62ff97c822aa644eec4104c21e530815c5.tar.gz
cpython-73709e62ff97c822aa644eec4104c21e530815c5.tar.bz2
#5741 followup: should also allow %%(blah)s.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index 2fa323b..14bfdb6 100644
--- a/Lib/ConfigParser.py
+++ b/Lib/ConfigParser.py
@@ -665,8 +665,8 @@ class SafeConfigParser(ConfigParser):
raise TypeError("option values must be strings")
# check for bad percent signs:
# first, replace all "good" interpolations
- tmp_value = self._interpvar_re.sub('', value)
- tmp_value = tmp_value.replace('%%', '')
+ tmp_value = value.replace('%%', '')
+ tmp_value = self._interpvar_re.sub('', tmp_value)
# then, check if there's a lone percent sign left
percent_index = tmp_value.find('%')
if percent_index != -1: