1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-09 18:39:04 +08:00

Fis: Handle missing pywin32

This commit is contained in:
LmeSzinc 2022-01-17 13:04:11 +08:00
parent 445877e43b
commit b92ee81e3f

View File

@ -292,7 +292,11 @@ class AlasManager(DeployConfig):
Yields:
str, str, str: executable_path, process_name, process_id
"""
try:
from win32com.client import GetObject
except ModuleNotFoundError:
print('pywin32 not installed, skip')
return False
wmi = GetObject('winmgmts:')
processes = wmi.InstancesOf('Win32_Process')
for p in processes: