1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 19:34:17 +00:00

defaults to yaml on load

This commit is contained in:
deadc0de6
2022-03-12 15:56:16 +01:00
committed by deadc0de
parent 5358ee20cb
commit c31f8ffcd5

View File

@@ -1216,13 +1216,10 @@ class CfgYaml:
@classmethod @classmethod
def _yaml_load(cls, path): def _yaml_load(cls, path):
"""load config file""" """load config file"""
is_yaml = path.lower().endswith(".yaml")
if is_yaml:
return cls.__yaml_load(path), 'yaml'
is_toml = path.lower().endswith(".toml") is_toml = path.lower().endswith(".toml")
if is_toml: if is_toml:
return cls.__toml_load(path), 'toml' return cls.__toml_load(path), 'toml'
raise YamlException("unsupported format") return cls.__yaml_load(path), 'yaml'
@classmethod @classmethod
def __yaml_load(cls, path): def __yaml_load(cls, path):