Python: module telemetry.internal.backends.chrome_inspector.devtools_http

telemetry.internal.backends.chrome_inspector.devtools_http | index telemetry/internal/backends/chrome_inspector/devtools_http.py

`# 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.`

Modules
`` |  |
errno telemetry.core.exceptions | httplib json | socket sys |

Classes
`` |  | __builtin__.object DevToolsHttp telemetry.core.exceptions.Error(exceptions.Exception) DevToolsClientConnectionError DevToolsClientUrlError
class DevToolsClientConnectionError(telemetry.core.exceptions.Error)
`` |  | Method resolution order: DevToolsClientConnectionError telemetry.core.exceptions.Error exceptions.Exception exceptions.BaseException __builtin__.object Methods inherited from telemetry.core.exceptions.Error: AddDebuggingMessage(self, msg) `Adds a message to the description of the exception. Many Telemetry exceptions arise from failures in another application. These failures are difficult to pinpoint. This method allows Telemetry classes to append useful debugging information to the exception. This method also logs information about the location from where it was called.` __init__(self, msg='') __str__(self) Data descriptors inherited from telemetry.core.exceptions.Error: __weakref__ `list of weak references to the object (if defined)` Data and other attributes inherited from exceptions.Exception: __new__ = <built-in method __new__ of type object> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from exceptions.BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __getslice__(...) `x.__getslice__(i, j) <==> x[i:j] Use of negative indices is not supported.` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __unicode__(...) Data descriptors inherited from exceptions.BaseException: __dict__ args message
class DevToolsClientUrlError(DevToolsClientConnectionError)
`` |  | Method resolution order: DevToolsClientUrlError DevToolsClientConnectionError telemetry.core.exceptions.Error exceptions.Exception exceptions.BaseException __builtin__.object Methods inherited from telemetry.core.exceptions.Error: AddDebuggingMessage(self, msg) `Adds a message to the description of the exception. Many Telemetry exceptions arise from failures in another application. These failures are difficult to pinpoint. This method allows Telemetry classes to append useful debugging information to the exception. This method also logs information about the location from where it was called.` __init__(self, msg='') __str__(self) Data descriptors inherited from telemetry.core.exceptions.Error: __weakref__ `list of weak references to the object (if defined)` Data and other attributes inherited from exceptions.Exception: __new__ = <built-in method __new__ of type object> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from exceptions.BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __getslice__(...) `x.__getslice__(i, j) <==> x[i:j] Use of negative indices is not supported.` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __unicode__(...) Data descriptors inherited from exceptions.BaseException: __dict__ args message
class DevToolsHttp(__builtin__.object)
`` | `A helper class to send and parse DevTools HTTP requests. This class maintains a persistent http connection to Chrome devtools. Ideally, owners of instances of this class should call Disconnect() before disposing of the instance. Otherwise, the connection will not be closed until the instance is garbage collected.`
| Methods defined here: Disconnect(self) `Closes the HTTP connection.` Request(self, path, timeout=30) `Sends a request to Chrome devtools. This method lazily creates an HTTP connection, if one does not already exist. Args: path: The DevTools URL path, without the /json/ prefix. timeout: Timeout defaults to 30 seconds. Raises: DevToolsClientConnectionError: If the connection fails.` RequestJson(self, path, timeout=30) `Sends a request and parse the response as JSON. Args: path: The DevTools URL path, without the /json/ prefix. timeout: Timeout defaults to 30 seconds. Raises: DevToolsClientConnectionError: If the connection fails. ValueError: If the response is not a valid JSON.` __del__(self) __init__(self, devtools_port) Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`