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 1db7c1b1499b56f936c2f012de339a096429b0b0..7cfc87370536d5cd4d81feec3c6501cd845725cd 100644 |
--- a/build/android/pylib/device/device_errors.py |
+++ b/build/android/pylib/device/device_errors.py |
@@ -14,10 +14,18 @@ class BaseError(Exception): |
class CommandFailedError(BaseError): |
"""Exception for command failures.""" |
- def __init__(self, cmd, msg, device=None): |
+ def __init__(self, msg, device=None): |
super(CommandFailedError, self).__init__( |
- (('device %s: ' % device) if device else '') + |
- 'adb command \'%s\' failed with message: \'%s\'' % (' '.join(cmd), msg)) |
+ '%s%s' % ('(device: %s) ' % device if device else '', msg)) |
+ |
+ |
+class AdbCommandFailedError(CommandFailedError): |
+ """Exception for adb command failures.""" |
+ |
+ def __init__(self, cmd, msg, device=None): |
+ super(AdbCommandFailedError, self).__init__( |
+ 'adb command \'%s\' failed with message: \'%s\'' % (' '.join(cmd), msg), |
+ device=device) |
class CommandTimeoutError(BaseError): |