From 735c9e89860969bf7f85a12d4099d904c9888340 Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Mon, 3 Jun 2024 18:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=B9=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pywxdump/wx_info/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pywxdump/wx_info/utils.py b/pywxdump/wx_info/utils.py index ef54df9..d647c7e 100644 --- a/pywxdump/wx_info/utils.py +++ b/pywxdump/wx_info/utils.py @@ -5,6 +5,7 @@ # Author: xaoyaoo # Date: 2023/12/25 # ------------------------------------------------------------------------------- +import os import re import sys import hmac @@ -40,6 +41,8 @@ def get_exe_version(file_path): :param file_path: PE 文件路径(可执行文件) :return: 如果遇到错误则返回 """ + if not os.path.exists(file_path): + return "None" file_version = Dispatch("Scripting.FileSystemObject").GetFileVersion(file_path) return file_version