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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user