Mercurial > hg
diff mercurial/config.py @ 22037:8665c647da6e
config: fix restoreconfig of non existing config
When the section, but no value existed, the `del` call raised a key error.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 05 Aug 2014 21:16:24 -0700 |
parents | fc04fdb2b349 |
children | f58b41f6708b |
line wrap: on
line diff
--- a/mercurial/config.py Thu Jul 31 13:51:17 2014 -0700 +++ b/mercurial/config.py Tue Aug 05 21:16:24 2014 -0700 @@ -76,7 +76,7 @@ # no data before, remove everything section, item = data if section in self._data: - del self._data[section][item] + self._data[section].pop(item, None) self._source.pop((section, item), None) def parse(self, src, data, sections=None, remap=None, include=None):