1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-29 16:17:13 +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: Yields:
str, str, str: executable_path, process_name, process_id str, str, str: executable_path, process_name, process_id
""" """
from win32com.client import GetObject try:
from win32com.client import GetObject
except ModuleNotFoundError:
print('pywin32 not installed, skip')
return False
wmi = GetObject('winmgmts:') wmi = GetObject('winmgmts:')
processes = wmi.InstancesOf('Win32_Process') processes = wmi.InstancesOf('Win32_Process')
for p in processes: for p in processes: