mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Fixed #5486 -- Worked around the lack of os.getpid() in Jython, whilst still using it for CPython. Patch from Leo Soto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6270 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -50,7 +50,11 @@ def make_msgid(idstring=None):
|
||||
"""
|
||||
timeval = time.time()
|
||||
utcdate = time.strftime('%Y%m%d%H%M%S', time.gmtime(timeval))
|
||||
pid = os.getpid()
|
||||
try:
|
||||
pid = os.getpid()
|
||||
except AttributeError:
|
||||
# Not getpid() in Jython, for example.
|
||||
pid = 1
|
||||
randint = random.randrange(100000)
|
||||
if idstring is None:
|
||||
idstring = ''
|
||||
|
||||
Reference in New Issue
Block a user