|
|
|
@ -66,12 +66,12 @@ class Config(object):
|
|
|
|
|
if not check_file(path, fail=False):
|
|
|
|
|
raise IOError(("The configuration file {} does not exist."
|
|
|
|
|
" Did you run 'pubs init' ?").format(path))
|
|
|
|
|
with _open(path, 'r') as f:
|
|
|
|
|
with _open(path, 'rb+') as f:
|
|
|
|
|
_read_config(self._cfg, f)
|
|
|
|
|
return self
|
|
|
|
|
|
|
|
|
|
def save(self, path=DFT_CONFIG_PATH):
|
|
|
|
|
with _open(path, 'w') as f:
|
|
|
|
|
with _open(path, 'wb+') as f:
|
|
|
|
|
self._cfg.write(f)
|
|
|
|
|
|
|
|
|
|
def __setattr__(self, name, value):
|
|
|
|
|