Support downloading configuration files from external URLs.
Browse files
utils.py
CHANGED
@@ -26,8 +26,8 @@ def load_config():
|
|
26 |
try:
|
27 |
with open('./api.yaml', 'r') as f:
|
28 |
# 判断是否为空文件
|
29 |
-
|
30 |
-
|
31 |
return update_config(conf)
|
32 |
else:
|
33 |
logger.error("配置文件 'api.yaml' 为空。请检查文件内容。")
|
|
|
26 |
try:
|
27 |
with open('./api.yaml', 'r') as f:
|
28 |
# 判断是否为空文件
|
29 |
+
conf = yaml.safe_load(f)
|
30 |
+
if conf:
|
31 |
return update_config(conf)
|
32 |
else:
|
33 |
logger.error("配置文件 'api.yaml' 为空。请检查文件内容。")
|