1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-15 18:07:23 +08:00

Fix: Handle empty cmdline in proc_list_uiautomator2()

This commit is contained in:
LmeSzinc
2023-03-01 18:13:49 +08:00
parent a500317002
commit 61f2f4013d
2 changed files with 3 additions and 3 deletions

View File

@@ -279,7 +279,7 @@ class Uiautomator2(Connection):
raise RequestHumanTakeover
@retry
def proc_list_uiautomato2(self) -> t.List[ProcessInfo]:
def proc_list_uiautomator2(self) -> t.List[ProcessInfo]:
"""
Get info about current processes.
"""
@@ -290,7 +290,7 @@ class Uiautomator2(Connection):
pid=proc['pid'],
ppid=proc['ppid'],
thread_count=proc['threadCount'],
cmdline=' '.join(proc['cmdline']),
cmdline=' '.join(proc['cmdline']) if proc['cmdline'] is not None else '',
name=proc['name'],
) for proc in resp.json()
]