diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-12 22:56:55 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-10-12 22:56:55 (GMT) |
commit | 93f5cd42e7a2cc99a7a9670e7d0ea7db2290fcf3 (patch) | |
tree | d6ba46953fd5c5a2db76106112566fea7a85e3ed /Lib/site.py | |
parent | 33d6e97a3ebf09e8b8f193d50de03311fd6e78c9 (diff) | |
download | cpython-93f5cd42e7a2cc99a7a9670e7d0ea7db2290fcf3.zip cpython-93f5cd42e7a2cc99a7a9670e7d0ea7db2290fcf3.tar.gz cpython-93f5cd42e7a2cc99a7a9670e7d0ea7db2290fcf3.tar.bz2 |
Merged revisions 85386-85387,85389 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85386 | victor.stinner | 2010-10-13 00:23:23 +0200 (mer., 13 oct. 2010) | 3 lines
Issue #6612: Fix site and sysconfig to catch os.getcwd() error, eg. if the
current directory was deleted.
........
r85387 | victor.stinner | 2010-10-13 00:26:08 +0200 (mer., 13 oct. 2010) | 2 lines
#6612: add the author of the patch (W. Trevor King)
........
r85389 | victor.stinner | 2010-10-13 00:42:37 +0200 (mer., 13 oct. 2010) | 2 lines
NEWS: Move #6612 to Library section
........
Diffstat (limited to 'Lib/site.py')
-rw-r--r-- | Lib/site.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/site.py b/Lib/site.py index 780ea7e..0cc22eb 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -67,7 +67,11 @@ USER_BASE = None def makepath(*paths): - dir = os.path.abspath(os.path.join(*paths)) + dir = os.path.join(*paths) + try: + dir = os.path.abspath(dir) + except OSError: + pass return dir, os.path.normcase(dir) @@ -78,8 +82,8 @@ def abs__file__(): continue # don't mess with a PEP 302-supplied __file__ try: m.__file__ = os.path.abspath(m.__file__) - except AttributeError: - continue + except (AttributeError, OSError): + pass def removeduppaths(): |