Skip to content

Commit

Permalink
🐛 Fixed config.
Browse files Browse the repository at this point in the history
  • Loading branch information
AirportR committed Mar 30, 2024
1 parent 81ec5a5 commit 5754bd0
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions utils/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,19 +741,6 @@ def __init__(self, configpath="./resources/config.yaml", data: dict = None):
with contextlib.suppress(FileNotFoundError), open(cfg_path, "r", encoding="UTF-8") as fp:
self.config = yaml.safe_load(fp)
self.yaml.update(self.config)

# if flag == 0 and cfg_path == "./resources/config.yaml":
# flag += 1
# logger.warning("无法在 ./resources/ 下找到 config.yaml 配置文件,正在尝试寻找旧目录 ./config.yaml")
# try:
# with open('./config.yaml', "r", encoding="UTF-8") as fp1:
# self.config = yaml.safe_load(fp1)
# self.yaml.update(self.config)
# except FileNotFoundError:
# self.config = {}
# self.yaml = {}
# elif flag > 1:
# logger.warning("无法找到配置文件,正在初始化...")
if self.config is None:
di = {'loader': "Success"}
with open(cfg_path, "w+", encoding="UTF-8") as fp:
Expand Down

0 comments on commit 5754bd0

Please sign in to comment.