Browse Source

support writing new resource file

Change-Id: I3da9b4697de3e09b7e689b89b7ed103a382fa8d2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 2 years ago
parent
commit
87893f96c3
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      downpour/resources.py

+ 6
- 0
downpour/resources.py View File

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

Loading…
Cancel
Save