diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index 083cf3cb8b..740ad5a86d 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -230,11 +230,8 @@ class ImmutableList(tuple): self.warning = warning return self - def complain(self, *wargs, **kwargs): - if isinstance(self.warning, Exception): - raise self.warning - else: - raise AttributeError(self.warning) + def complain(self, *args, **kwargs): + raise AttributeError(self.warning) # All list mutation functions complain. __delitem__ = complain