section = section or 'global'
self.config.set(section, key, value)
self.config.write()
+ self.config.reload()
@command(config_cmds)
section = section or 'global'
self.config.remove_option(section, key)
self.config.write()
+ self.config.reload()
for option, val in options.items():
self.set(section, option, val)
+ def reload(self):
+ self = self.__init__(self.path)
+
def apis(self):
return [api for api in self.sections() if api != 'global']
with open(self.path, 'w') as f:
os.chmod(self.path, 0600)
f.write(HEADER.lstrip())
+ f.flush()
RawConfigParser.write(self, f)