[ext] 增加了喷阀计数功能(未测试)(改掉了一个没有写入权限的bug)

This commit is contained in:
FEIJINTI 2022-09-05 10:24:38 +08:00
parent e62fdf3630
commit e74aad7b36

View File

@ -282,7 +282,7 @@ def valve_log(log_path: pathlib.Path, valve_num: [int, str]):
将喷阀的开启次数记录到文件log_path当中
"""
valve_str = "截至 " + datetime.now().strftime('%Y-%m-%d %H:%M:%S') + f' 喷阀使用次数: {valve_num}.'
with open(log_path) as f:
with open(log_path, "w") as f:
f.write(str(valve_str))