diff Lib/macpath.py @ 59814:44ffb8092ed6

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. ........
author Florent Xicluna <florent.xicluna@gmail.com>
date Sun, 21 Mar 2010 12:29:50 +0000
parents 733ccc3f3a68
children 4e099e5004a1
line wrap: on
line diff
--- a/Lib/macpath.py	Sun Mar 21 11:53:50 2010 +0000
+++ b/Lib/macpath.py	Sun Mar 21 12:29:50 2010 +0000
@@ -193,7 +193,10 @@
     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