Class e.c.u.u.UpdateChecker(Loggable):

Part of elisa.core.utils.update_checker View In Hierarchy

Helper Class for simple look up of updates on the remote elisa server.
Line # Kind Name Docs
77 Method __init__ Undocumented
89 Method parse_result Parse the given data into a dictionary. The syntax for result has to be
118 Method get_page This method is meant to be overridden in unit tests to mock requests to
125 Method request Request for update data and parse it
139 Method start Sets up an automatic loop of update url calls starting right now.
255 Method stop Stop any pending loop or http calls
155 Method _got_response Undocumented
163 Method _response_failed Undocumented
171 Method _update_plugin_cache Undocumented
239 Method _reset_pending_call Undocumented
244 Method _auto_request Undocumented
def __init__(self, install_date, user_id, version):
Undocumented
def parse_result(self, result):

Parse the given data into a dictionary. The syntax for result has to be a key-value pair per line separated by a colon (':'). Spaces at the beginning or the end are stripped from both the key and the value. For instance:

   foo: bar
   test: partial
   maybe : maybe not
Parametersresultthe result to parse (type: str )
Returnsa dictionary containing the key-value pairs (type: dict )
def get_page(self, url):
This method is meant to be overridden in unit tests to mock requests to a fake HTTP server.
def request(self):
Request for update data and parse it
def start(self, callback):
Sets up an automatic loop of update url calls starting right now. Everytime a result is received the callback is triggered with a dictionary of the parsed result as argument. The next iteration is done every check_interval-seconds.
RaisesAlreadyRunningif the method was already called before. It is only allowed to call this method once. It is mandatory to call stop before calling start again.
def _got_response(self, result, callback):
Undocumented
def _response_failed(self, failure):
Undocumented
def _update_plugin_cache(self, result):
Undocumented
def _reset_pending_call(self, result, callback):
Undocumented
def _auto_request(self, callback):
Undocumented
def stop(self):
Stop any pending loop or http calls
API Documentation for Elisa Media Center, generated by pydoctor at 2009-03-16 19:10:32.