summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-26 21:55:34 (GMT)
committerFred Drake <fdrake@acm.org>2001-02-26 21:55:34 (GMT)
commit3c823aa4b64653043ac8cdcb858b4042087862b0 (patch)
tree1248e09b65cf05808df6a78da49d774bc1b3e0fa /Lib/ConfigParser.py
parentffc215a2792db293786120c8c2aebd39f80c8e15 (diff)
downloadcpython-3c823aa4b64653043ac8cdcb858b4042087862b0.zip
cpython-3c823aa4b64653043ac8cdcb858b4042087862b0.tar.gz
cpython-3c823aa4b64653043ac8cdcb858b4042087862b0.tar.bz2
Make sure ConfigParser uses .optionxform() consistently; this affects
.has_option(), .remove_option(), and .set(). This closes SF tracker #232913.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index 94179da..cabbbdc 100644
--- a/Lib/ConfigParser.py
+++ b/Lib/ConfigParser.py
@@ -330,6 +330,7 @@ class ConfigParser:
elif not self.has_section(section):
return 0
else:
+ option = self.optionxform(option)
return self.__sections[section].has_key(option)
def set(self, section, option, value):
@@ -341,6 +342,7 @@ class ConfigParser:
sectdict = self.__sections[section]
except KeyError:
raise NoSectionError(section)
+ option = self.optionxform(option)
sectdict[option] = value
def write(self, fp):
@@ -368,6 +370,7 @@ class ConfigParser:
sectdict = self.__sections[section]
except KeyError:
raise NoSectionError(section)
+ option = self.optionxform(option)
existed = sectdict.has_key(option)
if existed:
del sectdict[option]