new method 'delete' in storage and config
This commit is contained in:
parent
bf754b1859
commit
ebe29a061f
6 changed files with 37 additions and 0 deletions
|
|
@ -98,3 +98,11 @@ class INIConfig(IConfig):
|
|||
v[k] = {}
|
||||
v = v[k]
|
||||
v[args[-2]] = args[-1]
|
||||
|
||||
def delete(self, *args):
|
||||
v = self.values
|
||||
for k in args[:-1]:
|
||||
if k not in v:
|
||||
return
|
||||
v = v[k]
|
||||
v.pop(args[-1], None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue