]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix character index in ExtendedInterpolation's exception message
authorŁukasz Langa <lukasz@langa.pl>
Tue, 23 Apr 2013 23:25:18 +0000 (01:25 +0200)
committerŁukasz Langa <lukasz@langa.pl>
Tue, 23 Apr 2013 23:25:18 +0000 (01:25 +0200)
Lib/configparser.py

index c7bee6bf1795876d744596108c9d10fdd9083972..6c5aa49bab63f38af93d0a8ab88286c0532bb571 100644 (file)
@@ -456,7 +456,7 @@ class ExtendedInterpolation(Interpolation):
         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,