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 7cf8ad6..eb0ab71 100644
--- a/Lib/mimetools.py
+++ b/Lib/mimetools.py
@@ -116,11 +116,11 @@
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()