def _wait(jid):
    if jid is None:
        jid = salt.utils.jid.gen_jid()
    states = _prior_running_states(jid)
    while states:
        time.sleep(1)
        states = _prior_running_states(jid)
Function will check given url and try to verify if it's a valid
dataset/ETHPy150Open saltstack/salt/salt/modules/state.py/_wait--crossover with--dataset/ETHPy150Open codeinn/vcs/vcs/backends/hg/repository.py/MercurialRepository._check_url