Skip to content

Commit

Permalink
Catched AdbError (#857)
Browse files Browse the repository at this point in the history
* Reconnect if offline

* Restore uiautomator2/__init__.py

* catched AdbError
  • Loading branch information
SmartManoj authored Mar 20, 2024
1 parent 72a2dd7 commit cb8e16d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uiautomator2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def _wait_for_device(self, timeout=None) -> adbutils.AdbDevice:
continue
try:
adb.wait_for(self._serial, timeout=1)
except adbutils.AdbTimeout:
except (adbutils.AdbError, adbutils.AdbTimeout):
continue

return adb.device(self._serial)
Expand Down

0 comments on commit cb8e16d

Please sign in to comment.