chore: 优化配置文件读取

This commit is contained in:
lerdb 2023-12-01 23:16:52 +08:00 committed by Folltoshe
parent 2396308527
commit 2957528792

View File

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