def should_exclude(dirname, excludes):
    """Returns true if the directory should be excluded when walking the source tree"""
    if excludes:
        if dirname in excludes:
            return True
    return False