[telemetry] Catch NoAdbError when killing the adb server.
BUG=567797,568151 Review URL: https://codereview.chromium.org/1526633003 Cr-Original-Commit-Position: refs/heads/master@{#365102} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: d2faab80fa1d4e178254e4e3e3366423acc6ba15
This commit is contained in:
Родитель
0ad27a3b82
Коммит
53086b4241
|
@ -112,6 +112,6 @@ class NoDevicesError(base_error.BaseError):
|
|||
class NoAdbError(base_error.BaseError):
|
||||
"""Exception for being unable to find ADB."""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, msg=None):
|
||||
super(NoAdbError, self).__init__(
|
||||
'Unable to find adb.', is_infra_error=True)
|
||||
msg or 'Unable to find adb.', is_infra_error=True)
|
||||
|
|
|
@ -115,7 +115,7 @@ class AdbWrapper(object):
|
|||
timeout_retry.CurrentTimeoutThreadGroup().GetRemainingTime())
|
||||
except OSError as e:
|
||||
if e.errno in (errno.ENOENT, errno.ENOEXEC):
|
||||
raise device_errors.NoAdbError()
|
||||
raise device_errors.NoAdbError(msg=str(e))
|
||||
else:
|
||||
raise
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче