diff options
author | Fred Drake <fdrake@acm.org> | 2001-07-06 17:22:48 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-07-06 17:22:48 (GMT) |
commit | beb6713ea700d28ea88c703f24c1ba6ba43230f8 (patch) | |
tree | 93990445ea49c8445ec05777803de58b06479479 /Lib/ConfigParser.py | |
parent | 45c23e61d88c20aa6a63060654fce182927ef915 (diff) | |
download | cpython-beb6713ea700d28ea88c703f24c1ba6ba43230f8.zip cpython-beb6713ea700d28ea88c703f24c1ba6ba43230f8.tar.gz cpython-beb6713ea700d28ea88c703f24c1ba6ba43230f8.tar.bz2 |
When reading a continuation line, make sure we still use the transformed
name when filling in the internal data structures, otherwise we incorrectly
raise a KeyError.
This fixes SF bug #432369.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r-- | Lib/ConfigParser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index cabbbdc..5eae972 100644 --- a/Lib/ConfigParser.py +++ b/Lib/ConfigParser.py @@ -431,7 +431,8 @@ class ConfigParser: if line[0] in ' \t' and cursect is not None and optname: value = line.strip() if value: - cursect[optname] = cursect[optname] + '\n ' + value + k = self.optionxform(optname) + cursect[k] = "%s\n%s" % (cursect[k], value) # a section header or option header? else: # is it a section header? |