Django

Code

Show
Ignore:
Timestamp:
03/21/08 16:39:50 (8 months ago)
Author:
gwilson
Message:

Noted an additional modification we have made to make_msgid.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/mail.py

    r7348 r7349  
    3939DNS_NAME = CachedDnsName() 
    4040 
    41 # Copied from Python standard library and modified to used the cached hostname 
    42 # for performance. 
     41# Copied from Python standard library, with the following modifications: 
     42# * Used cached hostname for performance. 
     43# * Added try/except to support lack of getpid() in Jython (#5496). 
    4344def make_msgid(idstring=None): 
    4445    """Returns a string suitable for RFC 2822 compliant Message-ID, e.g: 
     
    5455        pid = os.getpid() 
    5556    except AttributeError: 
    56         # Not getpid() in Jython, for example. 
     57        # No getpid() in Jython, for example. 
    5758        pid = 1 
    5859    randint = random.randrange(100000)