1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-09 14:04:17 +00:00

allow comments in yaml

This commit is contained in:
deadc0de6
2019-06-12 10:04:21 +02:00
parent fd67adf380
commit 42f195d7c6

View File

@@ -802,7 +802,9 @@ class CfgYaml:
def _yaml_load(self, path):
"""load from yaml"""
with open(path, 'r') as f:
content = yaml(typ='safe').load(f)
y = yaml()
y.typ = 'rt'
content = y.load(f)
return content
def _yaml_dump(self, content, path):
@@ -811,5 +813,5 @@ class CfgYaml:
y = yaml()
y.default_flow_style = False
y.indent = 2
y.typ = 'safe'
y.typ = 'rt'
y.dump(content, f)