[Python-checkins] python/dist/src/Lib user.py,1.6,1.7 posixpath.py,1.51,1.52

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Thu, 05 Sep 2002 14:08:28 -0700


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

Modified Files:
	user.py posixpath.py 
Log Message:
SF # 555779, import user doesn't work with CGIs

Index: user.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/user.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** user.py	1 Jun 2002 14:18:47 -0000	1.6
--- user.py	5 Sep 2002 21:08:25 -0000	1.7
***************
*** 27,30 ****
--- 27,32 ----
  if 'HOME' in os.environ:
      home = os.environ['HOME']
+ elif os.name == 'posix':
+     home = os.path.expanduser("~/")
  elif os.name == 'nt':                   # Contributed by Jeff Bauer
      if 'HOMEPATH' in os.environ:

Index: posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** posixpath.py	6 Jun 2002 18:16:14 -0000	1.51
--- posixpath.py	5 Sep 2002 21:08:25 -0000	1.52
***************
*** 304,309 ****
      if i == 1:
          if not 'HOME' in os.environ:
!             return path
!         userhome = os.environ['HOME']
      else:
          import pwd
--- 304,311 ----
      if i == 1:
          if not 'HOME' in os.environ:
!             import pwd
!             userhome = pwd.getpwuid(os.getuid())[5]
!         else:
!             userhome = os.environ['HOME']
      else:
          import pwd