'Check that exclude is a sequence without duplicates.'

def _check_exclude(self, obj):

    if (obj.exclude is None):
        return []
    elif (not isinstance(obj.exclude, (list, tuple))):
        return must_be('a    list    or    tuple', option='exclude', obj=obj, id='admin.E014')
    elif (len(obj.exclude) > len(set(obj.exclude))):
        return [checks.Error("The    value    of    'exclude'    contains    duplicate    field(s).", obj=obj.__class__, id='admin.E015')]
    else:
        return []
