Package DebTorrent :: Module HTTPCache :: Class CacheRequest
[hide private]
[frames] | no frames]

Class CacheRequest

source code

A new request to send to the server for the cache.

Instance Methods [hide private]
 
__init__(self, path, func)
Initialize the instance.
source code
 
save_response(self, r)
Save a returned response from the server.
source code
 
error(self, error_msg)
Save an error response.
source code
Instance Variables [hide private]
method func
the method to call when the download completes
list of string path
the server and path to download
(int, string, dictionary, string) response
the HTTP status code, status message, headers, and downloaded data
Method Details [hide private]

__init__(self, path, func)
(Constructor)

source code 
Initialize the instance.
Parameters:
  • path (list of string) - the server and path to download
  • func (method) - the method to call when the download completes

save_response(self, r)

source code 
Save a returned response from the server.
Parameters:
  • r (httplib.HTTPResponse) - the response from the server

error(self, error_msg)

source code 
Save an error response.
Parameters:
  • error_msg (string) - the error that occurred