raise err except IOError, err: ui_.warn("Connection to FCP server [%s:%i] failed.\n" % (params['FCP_HOST'], params['FCP_PORT'])) raise err runner = RequestRunner(connection, params['N_CONCURRENT']) if repo is None: # For incremental archives. ctx = ArchiveUpdateContext() update_sm = ArchiveStateMachine(runner, ctx) else: # For Infocalypse repositories ctx = UpdateContext(None) ctx.repo = repo ctx.ui_ = ui_ ctx.bundle_cache = cache update_sm = UpdateStateMachine(runner, ctx) update_sm.params = params.copy() update_sm.transition_callback = callbacks.transition_callback update_sm.monitor_callback = callbacks.monitor_callback # Modify only after copy. update_sm.params['FREENET_BUILD'] = runner.connection.node_hello[1][ 'Build'] return update_sm
raise err except IOError, err: ui_.warn("Connection to FCP server [%s:%i] failed.\n" % (params['FCP_HOST'], params['FCP_PORT'])) raise err runner = RequestRunner(connection, params['N_CONCURRENT']) if repo is None: # For incremental archives. ctx = ArchiveUpdateContext() update_sm = ArchiveStateMachine(runner, ctx) else: # For Infocalypse repositories ctx = UpdateContext(None) ctx.repo = repo ctx.ui_ = ui_ ctx.bundle_cache = cache update_sm = UpdateStateMachine(runner, ctx) update_sm.params = params.copy() update_sm.transition_callback = callbacks.transition_callback update_sm.monitor_callback = callbacks.monitor_callback # Modify only after copy. update_sm.params['FREENET_BUILD'] = runner.connection.node_hello[1]['Build'] return update_sm def run_until_quiescent(update_sm, poll_secs, close_socket=True):