Revision 844a6bdb kamaki/cli/config.py
b/kamaki/cli/config.py | ||
---|---|---|
248 | 248 |
|
249 | 249 |
def set_remote(self, remote, option, value): |
250 | 250 |
try: |
251 |
d = self.get('remote', remote) |
|
251 |
d = self.get('remote', remote) or dict()
|
|
252 | 252 |
except KeyError: |
253 |
pass
|
|
253 |
d = dict()
|
|
254 | 254 |
d[option] = value |
255 | 255 |
self.set('remote', remote, d) |
256 | 256 |
|
... | ... | |
299 | 299 |
except NoSectionError: |
300 | 300 |
pass |
301 | 301 |
|
302 |
def remove_from_remote(self, remote, option): |
|
303 |
d = self.get('remote', remote) |
|
304 |
if isinstance(d, dict): |
|
305 |
d.pop(option) |
|
306 |
|
|
302 | 307 |
def keys(self, section, include_defaults=True): |
303 | 308 |
d = self._get_dict(section, include_defaults) |
304 | 309 |
return d.keys() |
Also available in: Unified diff