import fnmatch


def _is_excluded(name, exclude):
    """
    Return true if given name matches the exclude list.
    """
    if not exclude:
        return False
    return any((fnmatch.fnmatchcase(name, i) for i in exclude))