From 8f4e4dff5b2c5196843580b5d451f2293862d930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Thu, 28 Apr 2011 10:58:57 +0200 Subject: Closes #11858: configparser.ExtendedInterpolation and section case. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by ゆかり ぴんく魔女. Thanks! --- Lib/configparser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Lib/configparser.py') diff --git a/Lib/configparser.py b/Lib/configparser.py index edef4f8ec0..0ecff701ad 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -481,17 +481,17 @@ class ExtendedInterpolation(Interpolation): if m is None: raise InterpolationSyntaxError(option, section, "bad interpolation variable reference %r" % rest) - path = parser.optionxform(m.group(1)).split(':') + path = m.group(1).split(':') rest = rest[m.end():] sect = section opt = option try: if len(path) == 1: - opt = path[0] + opt = parser.optionxform(path[0]) v = map[opt] elif len(path) == 2: sect = path[0] - opt = path[1] + opt = parser.optionxform(path[1]) v = parser.get(sect, opt, raw=True) else: raise InterpolationSyntaxError( @@ -1056,6 +1056,8 @@ class RawConfigParser(MutableMapping): if not optname: e = self._handle_error(e, fpname, lineno, line) optname = self.optionxform(optname.rstrip()) + if hasattr(self, '__ping__'): + import pdb; pdb.set_trace() if (self._strict and (sectname, optname) in elements_added): raise DuplicateOptionError(sectname, optname, -- cgit v1.2.1