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

Side by Side Diff: build/android/pylib/remote/device/remote_device_helper.py

Issue 1314313004: [Android][telemetry] Update pylib imports for modules that moved into devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Common functions and Exceptions for remote_device_*""" 5 """Common functions and Exceptions for remote_device_*"""
6 6
7 from pylib.utils import base_error 7 from devil import base_error
8 8
9 9
10 class RemoteDeviceError(base_error.BaseError): 10 class RemoteDeviceError(base_error.BaseError):
11 """Exception to throw when problems occur with remote device service.""" 11 """Exception to throw when problems occur with remote device service."""
12 pass 12 pass
13 13
14 14
15 def TestHttpResponse(response, error_msg): 15 def TestHttpResponse(response, error_msg):
16 """Checks the Http response from remote device service. 16 """Checks the Http response from remote device service.
17 17
18 Args: 18 Args:
19 response: response dict from the remote device service. 19 response: response dict from the remote device service.
20 error_msg: Error message to display if bad response is seen. 20 error_msg: Error message to display if bad response is seen.
21 """ 21 """
22 if response.status_code != 200: 22 if response.status_code != 200:
23 raise RemoteDeviceError( 23 raise RemoteDeviceError(
24 '%s (%d: %s)' % (error_msg, response.status_code, response.reason)) 24 '%s (%d: %s)' % (error_msg, response.status_code, response.reason))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698