[Python-bugs-list] [ python-Bugs-561822 ] ConfigParser has_option case sensitive
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 27 Sep 2002 08:35:47 -0700
Bugs item #561822, was opened at 2002-05-29 03:01
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=561822&group_id=5470
Category: Python Library
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: David Taylor (knet)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: ConfigParser has_option case sensitive
Initial Comment:
In python 2.x ConfigParser.py has_option has the
following case-sensitive code:
if not section or section == "DEFAULT":
return self.__defaults.has_key(option)
whereas the rest of the module uses option.lower().
This means the DEFAULT section is case-sensitive but
other sections are not.
Attached is a patch to fix the problem in Python 2.2.
----------------------------------------------------------------------
>Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2002-09-27 11:35
Message:
Logged In: YES
user_id=3066
Fixed in Lib/ConfigParser.py 1.38.10.2 + 1.38.10.3 and 1.45.
Added regression test in Lib/test/test_cfgparser.py
1.9.10.2 and 1.13.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=561822&group_id=5470