def parse_config(config_list, filter_func=None):
    """Parses list with "name=value" strings.

    Args:
        config_list: A list of "name=value" strings
        filter_func: A function taking the parsing config name and value for each line.
            If the function returns True the config value will be included in the final
            dict.

    Returns: A dict containing parsed data.
    """
    result = dict()
    for line in config_list:
        try:
            name, value = line.split('=', 1)
        except ValueError:
            continue
        name = name.strip()
        value = value.strip()
        if filter_func is None or callable(filter_func) and filter_func(name,
            value):
            result[name] = value
    return result
