Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4126736

Browse files
committed
When reading the file, option names were not passed through
self.optionxform(), which (in the default case) caused options spelled with opper case letters in their name to be inaccessible. Reported by "Todd R. Palmer" <[email protected]> on [email protected].
1 parent 6d4addd commit 4126736

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/ConfigParser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ def __read(self, fp, fpname):
440440
# allow empty values
441441
if optval == '""':
442442
optval = ''
443-
cursect[optname] = optval
443+
cursect[self.optionxform(optname)] = optval
444444
else:
445445
# a non-fatal parsing error occurred. set up the
446446
# exception but keep going. the exception will be

0 commit comments

Comments
 (0)