(file_extension)
return index_class
Get correct index task function for the supplied file type.

    Args:
        file_extension (str): File type based on filename extension.

    Returns:
        A task function.

    Raises:
        KeyError if no task class can be found.
Get correct index task function for the supplied file type.
Get correct index task function for the supplied file type .
def _get_index_task_class(file_extension):
    """Get correct index task function for the supplied file type.

    Args:
        file_extension (str): File type based on filename extension.

    Returns:
        A task function.

    Raises:
        KeyError if no task class can be found.
    """
    if file_extension == 'plaso':
        index_class = run_plaso
    elif file_extension in ['csv', 'jsonl']:
        index_class = run_csv_jsonl
    else:
        raise KeyError('No task that supports {0:s}'.format(file_extension))
    return index_class
def _get_index_task_class ( file_extension ) : if file_extension == 'plaso' : index_class = run_plaso elif file_extension in [ 'csv' , 'jsonl' ] : index_class = run_csv_jsonl else : raise KeyError ( 'No task that supports {0:s}' . format ( file_extension ) ) return index_class