def retry(sql, query):
    pause = 0.001
    error = sqlite3.OperationalError

    for _ in range(int(pause / LIMITS[u'timeout'])):
        try:
            sql(query).fetchone()
        except sqlite3.OperationalError as exc:
            error = exc
            time.sleep(pause)
        else:
            break
    else:
        raise error

    del error
dataset/ETHPy150Open grantjenks/python-diskcache/tests/utils.py/retry/swapped operands of `/`