def chk_all_funcs(looper, funcs, acceptable_fails=0, retry_wait=None, timeout=None, override_eventually_timeout=False):

    def chk():
        fails = 0
        last_ex = None
        for func in funcs:
            try:
                func()
            except Exception as ex:
                fails += 1
                if (fails >= acceptable_fails):
                    logger.debug('Too many fails, the last one: {}'.format(repr(ex)))
                last_ex = ex
        assert (fails <= acceptable_fails), '{} out of {} failed. Last exception: {}'.format(fails, len(funcs), last_ex)
    kwargs = {}
    if retry_wait:
        kwargs['retryWait'] = retry_wait
    if timeout:
        kwargs['timeout'] = timeout
    if override_eventually_timeout:
        kwargs['override_timeout_limit'] = override_eventually_timeout
    looper.run(eventually(chk, **kwargs))
def chk_all_funcs(looper, funcs, acceptable_fails=0, retry_wait=None, timeout=None, override_eventually_timeout=False):

    def chk():
        fails = 0
        last_ex = None
        for func in funcs:
            try:
                func()
            except Exception as ex:
                fails += 1
                if (fails >= acceptable_fails):
                    logger.debug('Too many fails, the last one: {}'.format(repr(ex)))
                last_ex = ex
        assert (fails <= acceptable_fails), '{} out of {} failed. Last exception: {}'.format(fails, len(funcs), last_ex)
    kwargs = {}
    if retry_wait:
        kwargs['retryWait'] = retry_wait
    if timeout:
        kwargs['timeout'] = timeout
    if override_eventually_timeout:
        kwargs['override_timeout_limit'] = override_eventually_timeout
    looper.run(eventually(chk, **kwargs))