Commit dc6369bb authored by Guido van Rossum's avatar Guido van Rossum

Don't die when getuid() or getpid() aren't defined.

parent 3fc4eb53
......@@ -106,8 +106,14 @@ def choose_boundary():
import socket
import os
hostid = socket.gethostbyname(socket.gethostname())
uid = `os.getuid()`
pid = `os.getpid()`
try:
uid = `os.getuid()`
except:
uid = '1'
try:
pid = `os.getpid()`
except:
pid = '1'
seed = `rand.rand()`
_prefix = hostid + '.' + uid + '.' + pid
timestamp = `int(time.time())`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment