mirror of
https://github.com/vale981/clay
synced 2025-03-05 09:31:40 -05:00
Docs.
This commit is contained in:
parent
808c0177e5
commit
130d5ad1c2
1 changed files with 6 additions and 0 deletions
|
@ -78,6 +78,12 @@ class _Settings(object):
|
|||
self._config = yaml.load(settings_file.read())
|
||||
|
||||
def _commit_edits(self, config):
|
||||
"""
|
||||
Write config to file.
|
||||
|
||||
This method is supposed to be called only
|
||||
from :py:meth:`~._SettingsEditor.__exit__`.
|
||||
"""
|
||||
self._config.update(config)
|
||||
with open(self._config_file_path, 'w') as settings_file:
|
||||
settings_file.write(yaml.dump(self._config, default_flow_style=False))
|
||||
|
|
Loading…
Add table
Reference in a new issue