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:
Skip Montanaro 2002-03-23 05:58:52 +00:00
parent 3c4a629bdc
commit 91cc17d20e
1 changed files with 2 additions and 2 deletions

View File

@ -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()