Fixed set_chain for python2

This commit is contained in:
Artem30801
2020-01-06 23:15:43 +03:00
parent 1bedb143d9
commit 5e37d05220

View File

@@ -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()