mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
Refs #23919 -- Removed misc Python 2/3 references.
This commit is contained in:
@@ -324,8 +324,8 @@ class EmailMessage:
|
||||
try:
|
||||
content = content.decode('utf-8')
|
||||
except UnicodeDecodeError:
|
||||
# If mimetype suggests the file is text but it's actually
|
||||
# binary, read() will raise a UnicodeDecodeError on Python 3.
|
||||
# If mimetype suggests the file is text but it's
|
||||
# actually binary, read() raises a UnicodeDecodeError.
|
||||
mimetype = DEFAULT_ATTACHMENT_MIME_TYPE
|
||||
|
||||
self.attachments.append((filename, content, mimetype))
|
||||
|
||||
Reference in New Issue
Block a user