Mercurial > cpython-lru_cache-weakref
diff Lib/configparser.py @ 53525:d580175997cd
Merged revisions 71564 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r71564 | georg.brandl | 2009-04-13 14:36:24 +0200 (Mo, 13 Apr 2009) | 1 line
#5741 followup: should also allow %%(blah)s.
........
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Mon, 27 Apr 2009 16:43:36 +0000 |
| parents | 4abc4ca4461f |
| children | 2ca842dcbe11 4fc8b6fe4af8 |
line wrap: on
line diff
--- a/Lib/configparser.py Mon Apr 27 16:42:58 2009 +0000 +++ b/Lib/configparser.py Mon Apr 27 16:43:36 2009 +0000 @@ -665,8 +665,8 @@ 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:
