Revision 8eb8c540
b/kamaki/cli/commands/config_cli.py | ||
---|---|---|
77 | 77 |
section = section or 'global' |
78 | 78 |
self.config.set(section, key, value) |
79 | 79 |
self.config.write() |
80 |
self.config.reload() |
|
80 | 81 |
|
81 | 82 |
|
82 | 83 |
@command(config_cmds) |
... | ... | |
88 | 89 |
section = section or 'global' |
89 | 90 |
self.config.remove_option(section, key) |
90 | 91 |
self.config.write() |
92 |
self.config.reload() |
b/kamaki/cli/config.py | ||
---|---|---|
106 | 106 |
for option, val in options.items(): |
107 | 107 |
self.set(section, option, val) |
108 | 108 |
|
109 |
def reload(self): |
|
110 |
self = self.__init__(self.path) |
|
111 |
|
|
109 | 112 |
def apis(self): |
110 | 113 |
return [api for api in self.sections() if api != 'global'] |
111 | 114 |
|
... | ... | |
148 | 151 |
with open(self.path, 'w') as f: |
149 | 152 |
os.chmod(self.path, 0600) |
150 | 153 |
f.write(HEADER.lstrip()) |
154 |
f.flush() |
|
151 | 155 |
RawConfigParser.write(self, f) |
Also available in: Unified diff