From afba0eb38427050e8ef6b05233113703c5b24a1f Mon Sep 17 00:00:00 2001 From: Zichao Lin Date: Mon, 28 Jul 2025 21:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96general?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=9A=84=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=94=B9?= =?UTF-8?q?=E7=94=A8subprocess.Popen=E4=BB=A5=E6=94=AF=E6=8C=81=E5=BC=82?= =?UTF-8?q?=E6=AD=A5=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index b816e73..7efab0b 100644 --- a/main.py +++ b/main.py @@ -166,7 +166,8 @@ def general_info(): """获取general信息""" LOGGER.info("获取general信息") try: - subprocess.run(["python", "general.py"], check=True) + process = subprocess.Popen(["python3", "general.py"]) + process.wait() except subprocess.CalledProcessError as e: LOGGER.error("获取general信息失败: %s", e)