mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Used super() in DjangoUnicodeDecodeError.
This commit is contained in:
		| @@ -11,11 +11,10 @@ from django.utils.functional import Promise | |||||||
| class DjangoUnicodeDecodeError(UnicodeDecodeError): | class DjangoUnicodeDecodeError(UnicodeDecodeError): | ||||||
|     def __init__(self, obj, *args): |     def __init__(self, obj, *args): | ||||||
|         self.obj = obj |         self.obj = obj | ||||||
|         UnicodeDecodeError.__init__(self, *args) |         super().__init__(*args) | ||||||
|  |  | ||||||
|     def __str__(self): |     def __str__(self): | ||||||
|         original = UnicodeDecodeError.__str__(self) |         return '%s. You passed in %r (%s)' % (super().__str__(), self.obj, type(self.obj)) | ||||||
|         return '%s. You passed in %r (%s)' % (original, self.obj, type(self.obj)) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| # For backwards compatibility. (originally in Django, then added to six 1.9) | # For backwards compatibility. (originally in Django, then added to six 1.9) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user