summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2020-10-02 12:21:15 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-10-30 10:44:44 +0100
commit1a8ad8a5c6f3344959e81531177164d1c4c4e52a (patch)
tree3e9ebd32c32e809cad4e31d1c51f620e95aa08c1 /django/utils
parentc3d9b8b28f8cde57706e23b7972bf6344cff88ac (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/utils')
-rw-r--r--django/utils/datastructures.py7
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