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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user