[Python-bugs-list] [ python-Bugs-404536 ] Bug in ConfigParser.py

nobody nobody@sourceforge.net
Tue, 27 Feb 2001 21:46:08 -0800


Bugs #404536, was updated on 2001-02-27 01:07
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=404536&group_id=5470

Category: None
Group: None
Status: Closed
Priority: 5
Submitted By: Nobody/Anonymous
Assigned to: Nobody/Anonymous
Summary: Bug in ConfigParser.py

Initial Comment:
One problem is that both get() and read() switch the 
options to lower case (using 
ConfigParser.optionxform), but NONE of the other 
methods do this.
Basically what this means is that ConfigParser only 
works if you don't use any upper case in your option 
names, or you only use read() and get().

Another bug is in the remove_option() function.
It seams to me that there is a unreferenced 
variable "key".

Source code from ConfigParser.remove_option()

existed = sectdict.has_key(key)
        if existed:
            del sectdict[key]

To be able to use the function remove_option(), I had 
to change the variable "key" to "option" which is 
declared in the function header like this:

existed = sectdict.has_key(option)
        if existed:
            del sectdict[option]

----------------------------------------------------------------------

Comment By: Fred L. Drake, Jr.
Date: 2001-02-27 21:46

Message:
Logged In: YES 
user_id=3066

Already fixed in CVS.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=404536&group_id=5470