Only AttributeError can be raised in this situation - on systems without
getuid or getpid. posix_getuid & posix_getpid never raise exceptions when called with no args.
This commit is contained in:
parent
3c4a629bdc
commit
91cc17d20e
|
@ -116,11 +116,11 @@ def choose_boundary():
|
|||
hostid = socket.gethostbyname(socket.gethostname())
|
||||
try:
|
||||
uid = `os.getuid()`
|
||||
except:
|
||||
except AttributeError:
|
||||
uid = '1'
|
||||
try:
|
||||
pid = `os.getpid()`
|
||||
except:
|
||||
except AttributeError:
|
||||
pid = '1'
|
||||
_prefix = hostid + '.' + uid + '.' + pid
|
||||
timestamp = '%.3f' % time.time()
|
||||
|
|
Loading…
Reference in New Issue