diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2011-02-28 14:09:58 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2011-02-28 14:09:58 +0000 |
| commit | b5b5d3c2800dae65cbd5466212844a422f7c95d8 (patch) | |
| tree | 6ef28f068da419f77753db091035b3f8ee26203f | |
| parent | a5f71e12643043da9bfdb554e0774c242f0f18b9 (diff) | |
[1.2.X] Fixed #15520 -- Fixed incompatibility with email module shipped 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
| -rw-r--r-- | django/core/mail/message.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/mail/message.py b/django/core/mail/message.py index f63157e75f..50d5a5454c 100644 --- a/django/core/mail/message.py +++ b/django/core/mail/message.py @@ -3,7 +3,10 @@ import os 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 |
