From 91cc17d20e0ad668944fcf8ef9a6c523455d64d7 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Sat, 23 Mar 2002 05:58:52 +0000 Subject: 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. --- Lib/mimetools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/mimetools.py') diff --git a/Lib/mimetools.py b/Lib/mimetools.py index 7cf8ad672e..eb0ab71310 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() -- cgit v1.2.1