fix: Support config.yml, config.yaml (#111)
This commit is contained in:
parent
4da7e6fa4b
commit
493939017e
@ -174,7 +174,7 @@ class ConfigManager:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def load_from_yml(self):
|
def load_from_yml(self):
|
||||||
for i in ['config_example.yml', 'config.yaml']:
|
for i in ['config_example.yml', 'config.yaml', 'config.yml']:
|
||||||
if not os.path.isfile(os.path.join(self.root_path, i)):
|
if not os.path.isfile(os.path.join(self.root_path, i)):
|
||||||
continue
|
continue
|
||||||
loaded = self.from_yaml(i)
|
loaded = self.from_yaml(i)
|
||||||
@ -197,7 +197,8 @@ class ConfigManager:
|
|||||||
|
|
||||||
Error: No config file found.
|
Error: No config file found.
|
||||||
|
|
||||||
You can run `cp config_example.yml {root_path}/config_example.yml`, and edit it.
|
You can run `cp config_example.yml {root_path}/config.yml`, and edit it.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
raise ImportError(msg)
|
raise ImportError(msg)
|
||||||
return config
|
return config
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user