summaryrefslogtreecommitdiff
path: root/django/dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'django/dispatch')
-rw-r--r--django/dispatch/dispatcher.py2
-rw-r--r--django/dispatch/saferef.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/django/dispatch/dispatcher.py b/django/dispatch/dispatcher.py
index ed9da57f27..0903c3a8a9 100644
--- a/django/dispatch/dispatcher.py
+++ b/django/dispatch/dispatcher.py
@@ -205,7 +205,7 @@ class Signal(object):
for receiver in self._live_receivers(_make_id(sender)):
try:
response = receiver(signal=self, sender=sender, **named)
- except Exception, err:
+ except Exception as err:
responses.append((receiver, err))
else:
responses.append((receiver, response))
diff --git a/django/dispatch/saferef.py b/django/dispatch/saferef.py
index 1c7d16474f..364c13e43b 100644
--- a/django/dispatch/saferef.py
+++ b/django/dispatch/saferef.py
@@ -119,10 +119,10 @@ class BoundMethodWeakref(object):
try:
if callable( function ):
function( self )
- except Exception, e:
+ except Exception as e:
try:
traceback.print_exc()
- except AttributeError, err:
+ except AttributeError as err:
print '''Exception during saferef %s cleanup function %s: %s'''%(
self, function, e
)