Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Unified Diff: build/android/pylib/device/device_errors.py

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/device/device_errors.py
diff --git a/build/android/pylib/device/device_errors.py b/build/android/pylib/device/device_errors.py
index 26d9eaf48b71c4c48a7b3cfa48a436b98fc70f07..e94968f146ad3256edbaa67460b79cdf410ee33f 100644
--- a/build/android/pylib/device/device_errors.py
+++ b/build/android/pylib/device/device_errors.py
@@ -42,6 +42,13 @@ class AdbCommandFailedError(CommandFailedError):
super(AdbCommandFailedError, self).__init__(message, device_serial)
+class DeviceVersionError(CommandFailedError):
+ """Exception for device version failures."""
+
+ def __init__(self, message, device_serial=None):
+ super(DeviceVersionError, self).__init__(message, device_serial)
+
+
class AdbShellCommandFailedError(AdbCommandFailedError):
"""Exception for shell command failures run via adb."""
@@ -52,7 +59,11 @@ class AdbShellCommandFailedError(AdbCommandFailedError):
message.append(' exit status: %s\n' % status)
if output:
message.append(' output:\n')
- message.extend(' - %s\n' % line for line in output.splitlines())
+ if isinstance(output, basestring):
+ output_lines = output.splitlines()
+ else:
+ output_lines = output
+ message.extend(' - %s\n' % line for line in output_lines)
else:
message.append(" output: ''\n")
message = ''.join(message)

Powered by Google App Engine
This is Rietveld 408576698