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

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

Issue 950893004: Add exit code for infra failures to testrunner script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made CL more general. BaseError now has is_infra_error property. Created 5 years, 10 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 c47c9668ed1a37b19556d6b5bf3e4262adac39f8..01040cb09464313d72d63ca78d73d55ce8d6b96f 100644
--- a/build/android/pylib/device/device_errors.py
+++ b/build/android/pylib/device/device_errors.py
@@ -7,14 +7,10 @@ Exception classes raised by AdbWrapper and DeviceUtils.
"""
from pylib import cmd_helper
+from pylib.base import base_error
-class BaseError(Exception):
- """Base exception for all device and command errors."""
- pass
-
-
-class CommandFailedError(BaseError):
+class CommandFailedError(base_error.BaseError):
"""Exception for command failures."""
def __init__(self, message, device_serial=None):
@@ -64,19 +60,18 @@ class AdbShellCommandFailedError(AdbCommandFailedError):
['shell', command], output, status, device_serial, message)
-class CommandTimeoutError(BaseError):
+class CommandTimeoutError(base_error.BaseError):
"""Exception for command timeouts."""
pass
-class DeviceUnreachableError(BaseError):
+class DeviceUnreachableError(base_error.BaseError):
"""Exception for device unreachable failures."""
pass
-class NoDevicesError(BaseError):
+class NoDevicesError(base_error.BaseError):
"""Exception for having no devices attached."""
def __init__(self):
super(NoDevicesError, self).__init__('No devices attached.')
-

Powered by Google App Engine
This is Rietveld 408576698