def delete_pool(name, session=None):
    """"""
    if not (name and name.strip()):
        raise AirflowBadRequest("Pool name shouldn't be empty")

    pool = session.query(Pool).filter_by(pool=name).first()
    if pool is None:
        raise PoolNotFound("Pool '%s' doesn't exist" % name)

    session.delete(pool)
    session.commit()

    return pool