Mercurial > cpython-lru_cache-weakref
diff Lib/site.py @ 65229:2ffbfbc0d3cb 2.7
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
........
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Tue, 12 Oct 2010 22:53:51 +0000 |
| parents | 11acc57f5804 |
| children | dd6d1ecbeb56 |
line wrap: on
line diff
--- a/Lib/site.py Tue Oct 12 14:16:46 2010 +0000 +++ b/Lib/site.py Tue Oct 12 22:53:51 2010 +0000 @@ -76,7 +76,11 @@ 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) @@ -87,8 +91,8 @@ 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():
