Skip to content

Commit 7ba4852

Browse files
committed
fix DeadSystemRuntimeException not in message, close #1001
1 parent 9b44181 commit 7ba4852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uiautomator2/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def _jsonrpc_call(dev: adbutils.AdbDevice, method: str, params: Any, timeout: fl
138138
if "android.os.DeadObjectException" in message:
139139
# https://developer.android.com/reference/android/os/DeadObjectException
140140
raise UiAutomationNotConnectedError("android.os.DeadObjectException")
141-
if "android.os.DeadSystemRuntimeException":
141+
if "android.os.DeadSystemRuntimeException" in message:
142142
raise UiAutomationNotConnectedError("android.os.DeadSystemRuntimeException")
143143
if "uiautomator.UiObjectNotFoundException" in message:
144144
raise UiObjectNotFoundError(code, message, params)

0 commit comments

Comments
 (0)