summaryrefslogtreecommitdiff
path: root/django/dispatch/saferef.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/dispatch/saferef.py')
-rw-r--r--django/dispatch/saferef.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/dispatch/saferef.py b/django/dispatch/saferef.py
index 364c13e43b..ebf423fc91 100644
--- a/django/dispatch/saferef.py
+++ b/django/dispatch/saferef.py
@@ -122,9 +122,9 @@ class BoundMethodWeakref(object):
except Exception as e:
try:
traceback.print_exc()
- except AttributeError as err:
- print '''Exception during saferef %s cleanup function %s: %s'''%(
- self, function, e
+ except AttributeError:
+ print('Exception during saferef %s cleanup function %s: %s' % (
+ self, function, e)
)
self.deletionMethods = [onDelete]
self.key = self.calculateKey( target )