[Python-checkins] r71566 - in python/branches/release26-maint: Lib/ConfigParser.py

georg.brandl python-checkins at python.org
Mon Apr 13 14:37:59 CEST 2009


Author: georg.brandl
Date: Mon Apr 13 14:37:59 2009
New Revision: 71566

Log:
Merged revisions 71564 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71564 | georg.brandl | 2009-04-13 12:36:24 +0000 (Mo, 13 Apr 2009) | 1 line
  
  #5741 followup: should also allow %%(blah)s.
........


Modified:
   python/branches/release26-maint/   (props changed)
   python/branches/release26-maint/Lib/ConfigParser.py

Modified: python/branches/release26-maint/Lib/ConfigParser.py
==============================================================================
--- python/branches/release26-maint/Lib/ConfigParser.py	(original)
+++ python/branches/release26-maint/Lib/ConfigParser.py	Mon Apr 13 14:37:59 2009
@@ -659,8 +659,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:


More information about the Python-checkins mailing list