[Python-checkins] CVS: python/dist/src/Lib mimetools.py,1.23,1.24

Skip Montanaro montanaro@users.sourceforge.net
Fri, 22 Mar 2002 21:58:54 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv23767

Modified Files:
	mimetools.py 
Log Message:
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.


Index: mimetools.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mimetools.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** mimetools.py	23 Feb 2001 20:04:54 -0000	1.23
--- mimetools.py	23 Mar 2002 05:58:52 -0000	1.24
***************
*** 117,125 ****
          try:
              uid = `os.getuid()`
!         except:
              uid = '1'
          try:
              pid = `os.getpid()`
!         except:
              pid = '1'
          _prefix = hostid + '.' + uid + '.' + pid
--- 117,125 ----
          try:
              uid = `os.getuid()`
!         except AttributeError:
              uid = '1'
          try:
              pid = `os.getpid()`
!         except AttributeError:
              pid = '1'
          _prefix = hostid + '.' + uid + '.' + pid