Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #15520 -- Fixed incompatibility with email module shipped with …

…Python 2.4 introduced in r15669. Thanks dobcey for the report.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b1a0ad007966898c305f4823c590a3e808095e9a 1 parent 13838fb
@ramiro ramiro authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/core/mail/
5 django/core/mail/
@@ -3,7 +3,10 @@
import random
import time
from email import Charset, Encoders
-from email.generator import Generator
+ from email.generator import Generator
+except ImportError:
+ from email.Generator import Generator # TODO: Remove when remove Python 2.4 support
from email.MIMEText import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
Please sign in to comment.
Something went wrong with that request. Please try again.