def object_list_check_unique_attribute(object_list,attr_name):
    """
    check if all the objects in the list have the same attribute value.
    """
    unique = True
    attr0 = object_list[0].__getattribute__(attr_name)
    for obj in object_list[1:]:
        if obj.__getattribute__(attr_name) == attr0:
            pass
        else:
            unique = False
            break
    return unique