def _wait(lfunc, log_lvl=None, log_msg=None, tries=10):
    i = 0
    while i < tries:
        time.sleep(1)

        if lfunc():
            return True
        else:
            i += 1
    if log_lvl is not None:
        log.log(LOG[log_lvl], log_msg)
    return False
Wait for lfunc to be True
dataset/ETHPy150Open saltstack/salt/salt/modules/bcache.py/_wait