]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport 1.7:
authorRaymond Hettinger <python@rcn.com>
Sun, 6 Oct 2002 03:13:29 +0000 (03:13 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 6 Oct 2002 03:13:29 +0000 (03:13 +0000)
SF # 555779, import user doesn't work with CGIs

Lib/user.py

index ee8ed88d638773b4a5ec03cd0852e613dacf51e3..4ec0241813b85c2faf4d06660cedf9b829371fb8 100644 (file)
@@ -26,6 +26,8 @@ import os
 home = os.curdir                        # Default
 if os.environ.has_key('HOME'):
     home = os.environ['HOME']
+elif os.name == 'posix':
+    home = os.path.expanduser("~/")
 elif os.name == 'nt':                   # Contributed by Jeff Bauer
     if os.environ.has_key('HOMEPATH'):
         if os.environ.has_key('HOMEDRIVE'):