diff --git a/dotdrop/cfg_yaml.py b/dotdrop/cfg_yaml.py index 4d7ec57..beca21c 100644 --- a/dotdrop/cfg_yaml.py +++ b/dotdrop/cfg_yaml.py @@ -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): diff --git a/scripts/yaml-to-toml.py b/scripts/yaml-to-toml.py index 1922ab0..b315a3a 100755 --- a/scripts/yaml-to-toml.py +++ b/scripts/yaml-to-toml.py @@ -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)