diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 42f9395e2..57837084f 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -619,7 +619,7 @@ class ConfigManager(QObject): optname = self.optionxform(optname) existed = optname in sectdict if existed: - del sectdict[optname] + sectdict.delete(optname) # WORKAROUND for https://bitbucket.org/logilab/pylint/issues/659/ self.get.cache_clear() # pylint: disable=no-member return existed diff --git a/qutebrowser/config/sections.py b/qutebrowser/config/sections.py index 2a20b5b80..bedde27aa 100644 --- a/qutebrowser/config/sections.py +++ b/qutebrowser/config/sections.py @@ -72,6 +72,10 @@ class Section: """Get value keys.""" return self.values.keys() + def delete(self, key): + """Delete item with given key.""" + del self.values[key] + def setv(self, layer, key, value, interpolated): """Set the value on a layer.