Fix TypeError on ConfigManager.remove_option
This commit is contained in:
parent
e68965fea2
commit
1941af8add
@ -619,7 +619,7 @@ class ConfigManager(QObject):
|
|||||||
optname = self.optionxform(optname)
|
optname = self.optionxform(optname)
|
||||||
existed = optname in sectdict
|
existed = optname in sectdict
|
||||||
if existed:
|
if existed:
|
||||||
del sectdict[optname]
|
sectdict.delete(optname)
|
||||||
# WORKAROUND for https://bitbucket.org/logilab/pylint/issues/659/
|
# WORKAROUND for https://bitbucket.org/logilab/pylint/issues/659/
|
||||||
self.get.cache_clear() # pylint: disable=no-member
|
self.get.cache_clear() # pylint: disable=no-member
|
||||||
return existed
|
return existed
|
||||||
|
@ -72,6 +72,10 @@ class Section:
|
|||||||
"""Get value keys."""
|
"""Get value keys."""
|
||||||
return self.values.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):
|
def setv(self, layer, key, value, interpolated):
|
||||||
"""Set the value on a layer.
|
"""Set the value on a layer.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user