fix: 配置文件不存在时的报错问题

This commit is contained in:
helloplhm-qwq 2023-12-01 19:16:06 +08:00
parent c0f2f35814
commit 9f325429bd
No known key found for this signature in database
GPG Key ID: B7542212855B2C26

View File

@ -38,8 +38,8 @@ def _read_config(key):
except:
return None
debug_mode = _read_config("common.debug_mode")
log_length_limit = _read_config("common.log_length_limit")
debug_mode = _read_config("common.debug_mode") if _read_config("common.debug_mode") else False
log_length_limit = _read_config("common.log_length_limit") if _read_config("common.log_length_limit") else 500
running = True
config = {}
workdir = os.getcwd()