Skip to content

Commit

Permalink
Noted an additional modification we have made to make_msgid.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
gdub committed Mar 21, 2008
1 parent c364b6b commit 6e2c677
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django/core/mail.py
Expand Up @@ -38,8 +38,9 @@ def get_fqdn(self):

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:
Expand All @@ -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:
Expand Down

0 comments on commit 6e2c677

Please sign in to comment.