summaryrefslogtreecommitdiffstats
path: root/Lib/site.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/site.py b/Lib/site.py
index 51516aa..9d1084a 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -70,7 +70,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)
@@ -81,11 +85,11 @@ def abs_paths():
continue # don't mess with a PEP 302-supplied __file__
try:
m.__file__ = os.path.abspath(m.__file__)
- except AttributeError:
+ except (AttributeError, OSError):
pass
try:
m.__cached__ = os.path.abspath(m.__cached__)
- except AttributeError:
+ except (AttributeError, OSError):
pass