diff options
author | Guido van Rossum <guido@python.org> | 1996-08-26 18:33:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-26 18:33:32 (GMT) |
commit | a8763e54ff25a226e50b281671189382fd3c324c (patch) | |
tree | bea9ea9a9f5bb33cbdfef607b4a8ce5e6197e98b /Lib/dos_8x3/mimetool.py | |
parent | 52a42fe9e706fb51ec608571c2b60e7694a5d0a2 (diff) | |
download | cpython-a8763e54ff25a226e50b281671189382fd3c324c.zip cpython-a8763e54ff25a226e50b281671189382fd3c324c.tar.gz cpython-a8763e54ff25a226e50b281671189382fd3c324c.tar.bz2 |
Another batch of updates...
Diffstat (limited to 'Lib/dos_8x3/mimetool.py')
-rwxr-xr-x | Lib/dos_8x3/mimetool.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/dos_8x3/mimetool.py b/Lib/dos_8x3/mimetool.py index da33a77..baf9379 100755 --- a/Lib/dos_8x3/mimetool.py +++ b/Lib/dos_8x3/mimetool.py @@ -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())` |