Revert "[tools] Add retries when trying to discover the device"
This reverts commit f1741bdd2b
.
Reason for revert: forgot to import 'time' module
Original change's description:
> [tools] Add retries when trying to discover the device
>
> This is an experimental change that may help mitigate the issue.
>
> TBR=machenbach@chromium.org
>
> No-Try: true
> No-Tree-Checks: true
> Bug: chromium:893593
> Change-Id: Ideb74a83b9937dbe917e8c7c93305d9824b48a93
> Reviewed-on: https://chromium-review.googlesource.com/c/1339419
> Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
> Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57556}
TBR=machenbach@chromium.org,sergiyb@chromium.org
Change-Id: I5ae591e099f630fdb4cd63d18bfb2f1bf347f929
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:893593
Reviewed-on: https://chromium-review.googlesource.com/c/1339519
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57557}
This commit is contained in:
parent
f1741bdd2b
commit
02f1529b1b
@ -50,13 +50,8 @@ class _Driver(object):
|
||||
devil_chromium.Initialize()
|
||||
|
||||
if not device:
|
||||
# Detect attached device if not specified. Retry 3 times with 60 second
|
||||
# sleep in-between.
|
||||
for _ in range(3):
|
||||
devices = adb_wrapper.AdbWrapper.Devices()
|
||||
if devices:
|
||||
break
|
||||
time.sleep(60)
|
||||
# Detect attached device if not specified.
|
||||
devices = adb_wrapper.AdbWrapper.Devices()
|
||||
assert devices, 'No devices detected'
|
||||
assert len(devices) == 1, 'Multiple devices detected.'
|
||||
device = str(devices[0])
|
||||
|
Loading…
Reference in New Issue
Block a user