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

Unified Diff: build/android/pylib/remote/device/remote_device_helper.py

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 6 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/remote/device/remote_device_helper.py
diff --git a/build/android/pylib/remote/device/remote_device_helper.py b/build/android/pylib/remote/device/remote_device_helper.py
new file mode 100644
index 0000000000000000000000000000000000000000..896ae99fab9ffd8d768b0508a273000374b43fab
--- /dev/null
+++ b/build/android/pylib/remote/device/remote_device_helper.py
@@ -0,0 +1,24 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Common functions and Exceptions for remote_device_*"""
+
+from pylib.utils import base_error
+
+
+class RemoteDeviceError(base_error.BaseError):
+ """Exception to throw when problems occur with remote device service."""
+ pass
+
+
+def TestHttpResponse(response, error_msg):
+ """Checks the Http response from remote device service.
+
+ Args:
+ response: response dict from the remote device service.
+ error_msg: Error message to display if bad response is seen.
+ """
+ if response.status_code != 200:
+ raise RemoteDeviceError(
+ '%s (%d: %s)' % (error_msg, response.status_code, response.reason))

Powered by Google App Engine
This is Rietveld 408576698