Skip to content

Commit

Permalink
fix: 修复yaml不支持的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq committed Apr 14, 2024
1 parent afd39e1 commit d6c113c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ConfigReadException(Exception):


default_str = default_config.default
default = yaml.safe_load(default_str)
default = yaml.load(default_str)


def handle_default_config():
Expand Down Expand Up @@ -370,7 +370,7 @@ def initConfig():
try:
with open("./config/config.yml", "r", encoding="utf-8") as f:
try:
variable.config = yaml.safe_load(f.read())
variable.config = yaml.load(f.read())
if (not isinstance(variable.config, dict)):
logger.warning('配置文件并不是一个有效的字典,使用默认值')
variable.config = default
Expand Down

0 comments on commit d6c113c

Please sign in to comment.