yym68686 commited on
Commit
728ade9
·
1 Parent(s): 465ab6f

Support downloading configuration files from external URLs.

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -26,8 +26,8 @@ def load_config():
26
  try:
27
  with open('./api.yaml', 'r') as f:
28
  # 判断是否为空文件
29
- if f.readable():
30
- conf = yaml.safe_load(f)
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' 为空。请检查文件内容。")