[Python-checkins] cpython (3.3): fix character index in ExtendedInterpolation's exception message

lukasz.langa python-checkins at python.org
Wed Apr 24 01:26:17 CEST 2013


http://hg.python.org/cpython/rev/44d764238f0d
changeset:   83508:44d764238f0d
branch:      3.3
parent:      83506:6a8cb4875ac6
user:        Łukasz Langa <lukasz at langa.pl>
date:        Wed Apr 24 01:25:18 2013 +0200
summary:
  fix character index in ExtendedInterpolation's exception message

files:
  Lib/configparser.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/configparser.py b/Lib/configparser.py
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -456,7 +456,7 @@
         tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax
         if '$' in tmp_value:
             raise ValueError("invalid interpolation syntax in %r at "
-                             "position %d" % (value, tmp_value.find('%')))
+                             "position %d" % (value, tmp_value.find('$')))
         return value
 
     def _interpolate_some(self, parser, option, accum, rest, section, map,

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list