mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 17:49:17 +00:00
defaults to yaml on load
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user