summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2008-03-21 21:39:50 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2008-03-21 21:39:50 +0000
commit6e2c677ef95e720692cf34c310110a9e698d3b07 (patch)
tree34a04d772bfcca7cf9aa096ec2176ab1d79aefcf
parentc364b6b3616d3f0840d6e7bd86787d53ac04c6c8 (diff)
Noted an additional modification we have made to `make_msgid`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/mail.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/core/mail.py b/django/core/mail.py
index c9f6833a1c..e5a14bede1 100644
--- a/django/core/mail.py
+++ b/django/core/mail.py
@@ -38,8 +38,9 @@ class CachedDnsName(object):
DNS_NAME = CachedDnsName()
-# Copied from Python standard library and modified to used the cached hostname
-# for performance.
+# Copied from Python standard library, with the following modifications:
+# * Used cached hostname for performance.
+# * Added try/except to support lack of getpid() in Jython (#5496).
def make_msgid(idstring=None):
"""Returns a string suitable for RFC 2822 compliant Message-ID, e.g:
@@ -53,7 +54,7 @@ def make_msgid(idstring=None):
try:
pid = os.getpid()
except AttributeError:
- # Not getpid() in Jython, for example.
+ # No getpid() in Jython, for example.
pid = 1
randint = random.randrange(100000)
if idstring is None: