| Index: build/android/pylib/device/decorators.py
|
| diff --git a/build/android/pylib/device/decorators.py b/build/android/pylib/device/decorators.py
|
| index ca29eb397fcd244ccad3a8aeb87df049def9083b..73c13da8b09b9c0c2ffe6053f6fac529801ed997 100644
|
| --- a/build/android/pylib/device/decorators.py
|
| +++ b/build/android/pylib/device/decorators.py
|
| @@ -16,6 +16,12 @@
|
| from pylib.device import device_errors
|
| from pylib.utils import reraiser_thread
|
| from pylib.utils import timeout_retry
|
| +
|
| +# TODO(jbudorick) Remove once the DeviceUtils implementations are no longer
|
| +# backed by AndroidCommands / android_testrunner.
|
| +sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, 'third_party',
|
| + 'android_testrunner'))
|
| +import errors as old_errors
|
|
|
| DEFAULT_TIMEOUT_ATTR = '_default_timeout'
|
| DEFAULT_RETRIES_ATTR = '_default_retries'
|
| @@ -49,6 +55,12 @@
|
| return impl()
|
| else:
|
| return timeout_retry.Run(impl, timeout, retries)
|
| + except old_errors.WaitForResponseTimedOutError as e:
|
| + raise device_errors.CommandTimeoutError(str(e)), None, (
|
| + sys.exc_info()[2])
|
| + except old_errors.DeviceUnresponsiveError as e:
|
| + raise device_errors.DeviceUnreachableError(str(e)), None, (
|
| + sys.exc_info()[2])
|
| except reraiser_thread.TimeoutError as e:
|
| raise device_errors.CommandTimeoutError(str(e)), None, (
|
| sys.exc_info()[2])
|
|
|