diff options
author | Skip Montanaro <skip@pobox.com> | 2002-03-23 05:58:52 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-03-23 05:58:52 (GMT) |
commit | 91cc17d20e0ad668944fcf8ef9a6c523455d64d7 (patch) | |
tree | 1fc98874bbb09c98b1a635f839c34204206c852a /Lib | |
parent | 3c4a629bdca5d57238b38e69820896acdb388785 (diff) | |
download | cpython-91cc17d20e0ad668944fcf8ef9a6c523455d64d7.zip cpython-91cc17d20e0ad668944fcf8ef9a6c523455d64d7.tar.gz cpython-91cc17d20e0ad668944fcf8ef9a6c523455d64d7.tar.bz2 |
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.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/mimetools.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/mimetools.py b/Lib/mimetools.py index 7cf8ad6..eb0ab71 100644 --- a/Lib/mimetools.py +++ b/Lib/mimetools.py @@ -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() |