Commit 92083465 authored by Łukasz Langa's avatar Łukasz Langa

Merged minor cleanups from 3.2.

parents 02548963 e1a1eb57
...@@ -1058,8 +1058,6 @@ class RawConfigParser(MutableMapping): ...@@ -1058,8 +1058,6 @@ class RawConfigParser(MutableMapping):
if not optname: if not optname:
e = self._handle_error(e, fpname, lineno, line) e = self._handle_error(e, fpname, lineno, line)
optname = self.optionxform(optname.rstrip()) optname = self.optionxform(optname.rstrip())
if hasattr(self, '__ping__'):
import pdb; pdb.set_trace()
if (self._strict and if (self._strict and
(sectname, optname) in elements_added): (sectname, optname) in elements_added):
raise DuplicateOptionError(sectname, optname, raise DuplicateOptionError(sectname, optname,
......
...@@ -993,7 +993,7 @@ class RawConfigParserTestCase(BasicTestCase): ...@@ -993,7 +993,7 @@ class RawConfigParserTestCase(BasicTestCase):
cf.add_section(123) cf.add_section(123)
cf.set(123, 'this is sick', True) cf.set(123, 'this is sick', True)
self.assertEqual(cf.get(123, 'this is sick'), True) self.assertEqual(cf.get(123, 'this is sick'), True)
if cf._dict.__class__ is configparser._default_dict: if cf._dict is configparser._default_dict:
# would not work for SortedDict; only checking for the most common # would not work for SortedDict; only checking for the most common
# default dictionary (OrderedDict) # default dictionary (OrderedDict)
cf.optionxform = lambda x: x cf.optionxform = lambda x: x
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment