Browse files

[1.2.X] Fixed #15520 -- Fixed incompatibility with email module shipp…

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

Backport of [15675] from trunk

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent a5f71e1 commit b5b5d3c2800dae65cbd5466212844a422f7c95d8 @ramiro ramiro committed Feb 28, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 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

0 comments on commit b5b5d3c

Please sign in to comment.