| Index: build/android/pylib/device/adb_wrapper.py
|
| diff --git a/build/android/pylib/device/adb_wrapper.py b/build/android/pylib/device/adb_wrapper.py
|
| index 8906b3f26eedab2511f37aeee3903283aaed5b70..f4a5931121acc5db030fea1b8e2bbf9bbf8b3271 100644
|
| --- a/build/android/pylib/device/adb_wrapper.py
|
| +++ b/build/android/pylib/device/adb_wrapper.py
|
| @@ -176,11 +176,13 @@
|
| ['shell', actual_command], timeout, retries, check_error=False)
|
| if expect_rc is not None:
|
| output_end = output.rstrip().rfind('\n') + 1
|
| - rc = int(output[output_end:].strip())
|
| + rc = output[output_end:].strip()
|
| output = output[:output_end]
|
| - if rc != expect_rc:
|
| - raise device_errors.AdbShellCommandFailedError(
|
| - command, rc, output, self._device_serial)
|
| + if int(rc) != expect_rc:
|
| + raise device_errors.AdbCommandFailedError(
|
| + ['shell', command],
|
| + 'shell command exited with code: %s' % rc,
|
| + self._device_serial)
|
| return output
|
|
|
| def Logcat(self, filter_spec=None, timeout=_DEFAULT_TIMEOUT,
|
|
|