mirror of https://github.com/Mai-with-u/MaiBot.git
refactor(common): 优化 SIMPLE_OUTPUT 环境变量读取逻辑
- 将 SIMPLE_OUTPUT环境变量的值转换为布尔型 - 提高代码可读性和健壮性pull/835/head
parent
b0b05d532b
commit
44a7058985
|
|
@ -33,6 +33,10 @@ current_file_path = Path(__file__).resolve()
|
|||
LOG_ROOT = "logs"
|
||||
|
||||
SIMPLE_OUTPUT = os.getenv("SIMPLE_OUTPUT", "false")
|
||||
if SIMPLE_OUTPUT == "true" or SIMPLE_OUTPUT == "True":
|
||||
SIMPLE_OUTPUT = True
|
||||
else:
|
||||
SIMPLE_OUTPUT = False
|
||||
print(f"SIMPLE_OUTPUT: {SIMPLE_OUTPUT}")
|
||||
|
||||
if not SIMPLE_OUTPUT:
|
||||
|
|
|
|||
Loading…
Reference in New Issue