mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
#5741 followup: should also allow %%(blah)s.
This commit is contained in:
parent
456cb1e694
commit
73709e62ff
1 changed files with 2 additions and 2 deletions
|
|
@ -665,8 +665,8 @@ def set(self, section, option, value):
|
||||||
raise TypeError("option values must be strings")
|
raise TypeError("option values must be strings")
|
||||||
# check for bad percent signs:
|
# check for bad percent signs:
|
||||||
# first, replace all "good" interpolations
|
# first, replace all "good" interpolations
|
||||||
tmp_value = self._interpvar_re.sub('', value)
|
tmp_value = value.replace('%%', '')
|
||||||
tmp_value = tmp_value.replace('%%', '')
|
tmp_value = self._interpvar_re.sub('', tmp_value)
|
||||||
# then, check if there's a lone percent sign left
|
# then, check if there's a lone percent sign left
|
||||||
percent_index = tmp_value.find('%')
|
percent_index = tmp_value.find('%')
|
||||||
if percent_index != -1:
|
if percent_index != -1:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue