diff options
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r-- | Lib/configparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py index a6ac059..f9584cd 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -962,8 +962,8 @@ class RawConfigParser(MutableMapping): # no update method in configparser is atomic in this implementation. if key == self.default_section: self._defaults.clear() - else: - self.remove_section(key) + elif key in self._sections: + self._sections[key].clear() self.read_dict({key: value}) def __delitem__(self, key): |