mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-05-30 00:39:32 +00:00
Fixed set_chain for python2
This commit is contained in:
@@ -66,15 +66,12 @@ class ConfigManager:
|
||||
current = current[key]
|
||||
return current
|
||||
|
||||
def set_chain(self, value, *keys, write=False): # will create new sections!
|
||||
def set_chain(self, value, *keys): # will create new sections!
|
||||
current = self.config
|
||||
for key in keys[:-1]:
|
||||
current = current.setdefault(key, {})
|
||||
current[keys[-1]] = value
|
||||
|
||||
if write:
|
||||
self.write()
|
||||
|
||||
def write(self):
|
||||
self.config.write()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user