summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-03-23 05:58:52 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-03-23 05:58:52 (GMT)
commit91cc17d20e0ad668944fcf8ef9a6c523455d64d7 (patch)
tree1fc98874bbb09c98b1a635f839c34204206c852a /Lib
parent3c4a629bdca5d57238b38e69820896acdb388785 (diff)
downloadcpython-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.py4
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()