mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: Support config.yml, config.yaml (#111)
This commit is contained in:
parent
4da7e6fa4b
commit
493939017e
|
|
@ -174,7 +174,7 @@ class ConfigManager:
|
|||
return True
|
||||
|
||||
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)):
|
||||
continue
|
||||
loaded = self.from_yaml(i)
|
||||
|
|
@ -197,7 +197,8 @@ class ConfigManager:
|
|||
|
||||
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)
|
||||
return config
|
||||
|
|
|
|||
Loading…
Reference in New Issue