From a40259b204a3196d0e45f87fc075eb1fd7ebe23c Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Fri, 15 Mar 2024 15:10:19 +0800 Subject: [PATCH] =?UTF-8?q?subprocess=20=E9=9A=90=E8=97=8F=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pywxdump/wx_info/merge_db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pywxdump/wx_info/merge_db.py b/pywxdump/wx_info/merge_db.py index 3a2d340..860eb8d 100644 --- a/pywxdump/wx_info/merge_db.py +++ b/pywxdump/wx_info/merge_db.py @@ -357,7 +357,7 @@ def merge_real_time_db(key, db_path: str, merge_path: str, CreateTime: int = 0, raise FileNotFoundError("数据库不存在") if "MSG" not in db_path and "MicroMsg" not in db_path and "MediaMSG" not in db_path: - raise FileNotFoundError("数据库不是消息数据库") # MicroMsg实时数据库 + raise FileNotFoundError("数据库不是消息数据库") # MicroMsg实时数据库 out_path = "tmp_" + ''.join( random.choices('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', k=6)) + ".db" @@ -374,7 +374,8 @@ def merge_real_time_db(key, db_path: str, merge_path: str, CreateTime: int = 0, # 调用cmd命令 cmd = f"{real_time_exe_path} \"{key}\" \"{db_path}\" \"{out_path}\" {CreateTime} {endCreateTime}" # os.system(cmd) - p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + creationflags=subprocess.CREATE_NO_WINDOW) p.communicate() if not os.path.exists(out_path):