From: Skip Montanaro Date: Sat, 23 Mar 2002 05:58:52 +0000 (+0000) Subject: Only AttributeError can be raised in this situation - on systems without X-Git-Tag: v2.3c1~6379 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91cc17d20e0ad668944fcf8ef9a6c523455d64d7;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/mimetools.py b/Lib/mimetools.py index 7cf8ad672e02..eb0ab713109c 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()