File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1- from multiprocessing import process
2- import re
31from loguru import logger
42from pathlib import Path
53import os
@@ -285,7 +283,7 @@ def get_exe_version(path) -> tuple[bool, str]:
285283 # 方法4: 返回文件基本信息
286284 file_stat = file .stat ()
287285 file_size = file_stat .st_size / 1024 / 1024 # MB
288- size + = f"{ file_size :.2f} MB\n "
286+ size = f"{ file_size :.2f} MB\n "
289287
290288 logger .info ("无法获取版本信息,返回文件大小" )
291289 return True , size
@@ -308,8 +306,8 @@ def check_exe_running(path) -> bool:
308306 Returns:
309307 bool: 正在运行返回True
310308 """
311- process = path .rsplit ('/' , 1 )[- 1 ] or path .rsplit ('\\ ' , 1 )[- 1 ]
312309 try :
310+ process = path .rsplit ('/' , 1 )[- 1 ] or path .rsplit ('\\ ' , 1 )[- 1 ]
313311 # 在Windows上检查进程
314312 if os .name == 'nt' :
315313 result = subprocess .run (
You can’t perform that action at this time.
0 commit comments