Package openid :: Module fetchers :: Class ExceptionWrappingFetcher
[hide private]
[frames] | no frames]

Class ExceptionWrappingFetcher

source code

 object --+    
          |    
HTTPFetcher --+
              |
             ExceptionWrappingFetcher

Fetcher that wraps another fetcher, causing all exceptions

Instance Methods [hide private]
 
__init__(self, fetcher)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
HTTPResponse
fetch(self, *args, **kwargs)
This performs an HTTP POST or GET, following redirects along the way.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  uncaught_exceptions = (<type 'exceptions.SystemExit'>, <type '...
Exceptions that should be exposed to the user if they are raised by the fetch call
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, fetcher)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

fetch(self, *args, **kwargs)

source code 

This performs an HTTP POST or GET, following redirects along the way. If a body is specified, then the request will be a POST. Otherwise, it will be a GET.

Parameters:
  • headers - HTTP headers to include with the request
Returns: HTTPResponse
An object representing the server's HTTP response. If there are network or protocol errors, an exception will be raised. HTTP error responses, like 404 or 500, do not cause exceptions.
Raises:
  • Exception - Different implementations will raise different errors based on the underlying HTTP library.
Overrides: HTTPFetcher.fetch
(inherited documentation)

Class Variable Details [hide private]

uncaught_exceptions

Exceptions that should be exposed to the user if they are raised by the fetch call
Value:
(<type 'exceptions.SystemExit'>,
 <type 'exceptions.KeyboardInterrupt'>,
 <type 'exceptions.MemoryError'>)