summaryrefslogtreecommitdiff
path: root/django/dispatch
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-01-24 08:31:58 -0500
committerGitHub <noreply@github.com>2017-01-24 08:31:58 -0500
commit435e4bf38e97255acd97eacadeb8fe312ba97aff (patch)
treef5d66a7aa827aa41e9ee880c4b5586a4b099a17d /django/dispatch
parente5c2e43cc832028a974399af07a1c3ba6afa2467 (diff)
Refs #23919 -- Removed __traceback__ setting needed for Python 2.
Partially reverted refs #25761 and refs #16245.
Diffstat (limited to 'django/dispatch')
-rw-r--r--django/dispatch/dispatcher.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/django/dispatch/dispatcher.py b/django/dispatch/dispatcher.py
index 09992c5b8c..5599b9fdfc 100644
--- a/django/dispatch/dispatcher.py
+++ b/django/dispatch/dispatcher.py
@@ -1,4 +1,3 @@
-import sys
import threading
import weakref
@@ -200,8 +199,7 @@ class Signal:
If any receiver raises an error (specifically any subclass of
Exception), the error instance is returned as the result for that
- receiver. The traceback is always attached to the error at
- ``__traceback__``.
+ receiver.
"""
if not self.receivers or self.sender_receivers_cache.get(sender) is NO_RECEIVERS:
return []
@@ -213,8 +211,6 @@ class Signal:
try:
response = receiver(signal=self, sender=sender, **named)
except Exception as err:
- if not hasattr(err, '__traceback__'):
- err.__traceback__ = sys.exc_info()[2]
responses.append((receiver, err))
else:
responses.append((receiver, response))