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

Unified Diff: build/android/devil/android/device_errors.py

Issue 1417373002: [Android] Add functionality to flash devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/devil/android/device_errors.py
diff --git a/build/android/devil/android/device_errors.py b/build/android/devil/android/device_errors.py
index fde7d1aa99f3b49923be5ebf348567b0959905fd..ef6e3a9a00f8f4864ecec534825a924c81a8e81b 100644
--- a/build/android/devil/android/device_errors.py
+++ b/build/android/devil/android/device_errors.py
@@ -20,8 +20,8 @@ class CommandFailedError(base_error.BaseError):
super(CommandFailedError, self).__init__(message)
-class AdbCommandFailedError(CommandFailedError):
- """Exception for adb command failures."""
+class _BaseCommandFailedError(CommandFailedError):
+ """Base Exception for adb and fastboot command failures."""
def __init__(self, args, output, status=None, device_serial=None,
message=None):
@@ -39,7 +39,26 @@ class AdbCommandFailedError(CommandFailedError):
else:
message.append('and no output.')
message = ''.join(message)
- super(AdbCommandFailedError, self).__init__(message, device_serial)
+ super(_BaseCommandFailedError, self).__init__(message, device_serial)
+
+class AdbCommandFailedError(_BaseCommandFailedError):
+ """Exception for adb command failures."""
+
+ def __init__(self, args, output, status=None, device_serial=None,
+ message=None):
+ super(AdbCommandFailedError, self).__init__(
+ args, output, status=status, message=message,
+ device_serial=device_serial)
+
+
+class FastbootCommandFailedError(_BaseCommandFailedError):
+ """Exception for fastboot command failures."""
+
+ def __init__(self, args, output, status=None, device_serial=None,
+ message=None):
+ super(FastbootCommandFailedError, self).__init__(
+ args, output, status=status, message=message,
+ device_serial=device_serial)
class DeviceVersionError(CommandFailedError):

Powered by Google App Engine
This is Rietveld 408576698