From 9dfd4f7c904c273e490430797c8a0d7a12536e5c Mon Sep 17 00:00:00 2001 From: IrvingGao <1729854488@qq.com> Date: Thu, 13 Jun 2024 16:00:39 +0800 Subject: [PATCH] [wifi] fix big bugs --- wifi_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wifi_manager.py b/wifi_manager.py index 106cbf8..d8946db 100644 --- a/wifi_manager.py +++ b/wifi_manager.py @@ -68,9 +68,9 @@ def edit_line_in_file(file_path, search_string, replacement_string): if search_string in line: file.write(replacement_string + '\n') edit = True + logging.info(f"{datetime.datetime.now()}: The line has been edited. \noriginal line: {line}, \nnew line: {replacement_string}") else: file.write(line) - logging.info(f"{datetime.datetime.now()}: The line has been edited.") return edit except FileNotFoundError: logging.info(f"The file {file_path} does not exist.") @@ -104,6 +104,8 @@ def close_app(): # 保存Wi-Fi IP地址 save_local_ip() + logging.info(f"{datetime.datetime.now()}: Exit Wi-Fi hotspot...") + # 获取当前Flask应用程序的进程ID flask_pid = os.getpid()