def check_ended(history_db, scene, conn, cur):
    """checks if a scene has ended"""
    from src.praxxis.util import error
    ended = 'SELECT Ended from "SceneHistory" WHERE Scene = ?'
    cur.execute(ended, (scene,))
    ended = cur.fetchone()
    if ended is None:
        raise error.SceneNotFoundError(scene)
    elif ended[0]:
        raise error.EndEndedSceneError(scene)
    return ended
