diff options
Diffstat (limited to 'Lib/configparser.py')
-rw-r--r-- | Lib/configparser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/configparser.py b/Lib/configparser.py index ea788aec51..4a16101c7a 100644 --- a/Lib/configparser.py +++ b/Lib/configparser.py @@ -963,7 +963,8 @@ class RawConfigParser(MutableMapping): def __setitem__(self, key, value): # To conform with the mapping protocol, overwrites existing values in # the section. - + if key in self and self[key] is value: + return # XXX this is not atomic if read_dict fails at any point. Then again, # no update method in configparser is atomic in this implementation. if key == self.default_section: |