diff options
| author | Tim Graham <timograham@gmail.com> | 2017-02-01 15:50:18 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-02-03 19:16:14 -0500 |
| commit | 4ee877a7b08d22b5902be15379424b45072580fb (patch) | |
| tree | 86a15d46158e1583edf05bc41b482054e99111c8 | |
| parent | 2f1394c76dd586ceab3f86f5b6cb4473382c9af8 (diff) | |
Used super() in DjangoUnicodeDecodeError.
| -rw-r--r-- | django/utils/encoding.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/utils/encoding.py b/django/utils/encoding.py index 32206d74be..7d33f58f1a 100644 --- a/django/utils/encoding.py +++ b/django/utils/encoding.py @@ -11,11 +11,10 @@ from django.utils.functional import Promise class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj - UnicodeDecodeError.__init__(self, *args) + super().__init__(*args) def __str__(self): - original = UnicodeDecodeError.__str__(self) - return '%s. You passed in %r (%s)' % (original, self.obj, type(self.obj)) + return '%s. You passed in %r (%s)' % (super().__str__(), self.obj, type(self.obj)) # For backwards compatibility. (originally in Django, then added to six 1.9) |
