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

nobody nobody@sourceforge.net
Tue, 27 Feb 2001 01:06:18 -0800


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

Category: None
Group: None
Status: Open
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]

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

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