From 493939017ef8e004a27d9a3cddd44c91dd5fcaf2 Mon Sep 17 00:00:00 2001 From: Bryan Date: Mon, 15 Apr 2024 18:05:50 +0800 Subject: [PATCH] fix: Support config.yml, config.yaml (#111) --- apps/smartdoc/conf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/smartdoc/conf.py b/apps/smartdoc/conf.py index 162971f48..27e1e8b08 100644 --- a/apps/smartdoc/conf.py +++ b/apps/smartdoc/conf.py @@ -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