def exists(storage, indexname = None):
    """Returns True if the given Storage object contains a Whoosh
    index.
    
    :param storage: a store.Storage object.
    :param indexname: the name of the index. If None, the default index name is used.
    :param rtype: bool
    """
    
    if indexname is None:
        indexname = _DEF_INDEX_NAME
        
    try:
        ix = storage.open_index(indexname)
        return -1 > ix.latest_generation()
    except EmptyIndexError:
        pass
    
    return False
dataset/ETHPy150Open dokipen/whoosh/src/whoosh/index.py/exists/swapped operands of `>`