1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 15:39:43 +00:00
This commit is contained in:
deadc0de6
2022-03-12 15:43:10 +01:00
committed by deadc0de
parent da094e3181
commit 5358ee20cb
2 changed files with 4 additions and 5 deletions

View File

@@ -1250,11 +1250,11 @@ class CfgYaml:
@classmethod
def _yaml_dump(cls, content, file, fmt='yaml'):
"""dump config file"""
if 'toml':
if fmt == 'toml':
return cls.__toml_dump(content, file)
if 'yaml':
return cls.__yaml_dump(content, file)
raise YamlException("unsupported format")
if fmt == 'yaml':
return cls.__yaml_dump(content, file)
raise YamlException("unsupported format")
@classmethod
def __yaml_dump(cls, content, file):

View File

@@ -54,7 +54,6 @@ if __name__ == '__main__':
path = sys.argv[1]
content = yaml_load(path)
#print(content)
content = replace_None(content)
out = toml_dump(content)
print(out)