Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b5b5d3c2800dae65cbd5466212844a422f7c95d8 1 parent a5f71e1
@ramiro ramiro authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/core/mail/message.py
View
5 django/core/mail/message.py
@@ -3,7 +3,10 @@
import random
import time
from email import Charset, Encoders
-from email.generator import Generator
+try:
+ 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.