support writing new resource file

Change-Id: I3da9b4697de3e09b7e689b89b7ed103a382fa8d2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-04-30 21:28:43 +00:00
parent 67134ff7f0
commit 87893f96c3
1 changed files with 6 additions and 0 deletions

View File

@ -51,3 +51,9 @@ def load(filename, missing_ok=False):
s['save_state'] = True
return to_return
def save(filename, to_export):
"Write the resources file."
with open(filename, 'w', encoding='utf-8') as fd:
fd.write(to_export.toYAML())