def _process_versioninfo(self, ctx): ''' Process version information ''' if not 'result' in ctx: logging.error('updater_runner: no result') self._schedule() return length, body, error = ctx.pop('result') if length == -1: logging.info('updater_runner: %s', str(error)) self._schedule() return vinfo = updater_utils.versioninfo_extract(body) if not vinfo: logging.error('updater_runner: invalid versioninfo') self._schedule() return cur = utils_version.NUMERIC_VERSION if not updater_utils.versioninfo_is_newer(vinfo): logging.debug('updater_runner: no updates available') self._schedule() return logging.info('updater_runner: %s -> %s', cur, vinfo) self.retrieve_files(ctx, vinfo)
def _process_versioninfo(self, ctx): ''' Process version information ''' # TODO make this function more robust wrt unexpected errors if not 'result' in ctx: logging.error('updater_runner: no result') self._schedule() return length, body, error = ctx.pop('result') if length == -1: logging.error('updater_runner: error: %s', str(error)) self._schedule() return vinfo = updater_utils.versioninfo_extract(body) if not vinfo: logging.error('updater_runner: invalid versioninfo') self._schedule() return if not updater_utils.versioninfo_is_newer(vinfo): logging.debug('updater_runner: no updates available') self._schedule() return self.retrieve_files(vinfo)