summaryrefslogtreecommitdiffstats
path: root/Lib/macpath.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-21 12:29:50 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-21 12:29:50 (GMT)
commit54467e0daaadb5a9bb5ca8a3c7654dd310d2f230 (patch)
tree971dbe411aca3709953069a97e3f06c63cb5de4e /Lib/macpath.py
parent53b95e77e059ad1858341cd07c84a212652e32b2 (diff)
downloadcpython-54467e0daaadb5a9bb5ca8a3c7654dd310d2f230.zip
cpython-54467e0daaadb5a9bb5ca8a3c7654dd310d2f230.tar.gz
cpython-54467e0daaadb5a9bb5ca8a3c7654dd310d2f230.tar.bz2
Merged revisions 79195 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r79195 | florent.xicluna | 2010-03-21 13:27:20 +0100 (dim, 21 mar 2010) | 2 lines Issue #8179: Fix macpath.realpath() on a non-existing path. ........
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r--Lib/macpath.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index f58a195..3b3e4ff 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -193,7 +193,10 @@ def realpath(path):
path = components[0] + colon
for c in components[1:]:
path = join(path, c)
- path = Carbon.File.FSResolveAliasFile(path, 1)[0].as_pathname()
+ try:
+ path = Carbon.File.FSResolveAliasFile(path, 1)[0].as_pathname()
+ except Carbon.File.Error:
+ pass
return path
supports_unicode_filenames = False