diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2020-10-02 12:21:15 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-10-30 10:44:44 +0100 |
| commit | 1a8ad8a5c6f3344959e81531177164d1c4c4e52a (patch) | |
| tree | 3e9ebd32c32e809cad4e31d1c51f620e95aa08c1 /django | |
| parent | c3d9b8b28f8cde57706e23b7972bf6344cff88ac (diff) | |
Removed unused custom exception support for ImmutableList.
If the warning provided was an instance of Exception, then it would be
used as-is. In practice this is untested, unused and ImmutableList is
an undocumented internal datastructure.
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/datastructures.py | 7 |
1 files changed, 2 insertions, 5 deletions
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 |
