]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 79195 via svnmerge from
authorFlorent Xicluna <florent.xicluna@gmail.com>
Sun, 21 Mar 2010 12:29:50 +0000 (12:29 +0000)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Sun, 21 Mar 2010 12:29:50 +0000 (12:29 +0000)
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.
........

Lib/macpath.py
Misc/NEWS

index f58a19579238d140a073790ff06ad53e429623e4..3b3e4ff071694ef7869379823d9dd4944a2effa1 100644 (file)
@@ -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
index 7c8c7119e45b375be55ccfa7befb162b03da0bb9..e85ab0013dda561606a75f7b2cbfc01bd438fca0 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -285,6 +285,8 @@ C-API
 Library
 -------
 
+- Issue #8179: Fix macpath.realpath() on a non-existing path.
+
 - Issue #8024: Update the Unicode database to 5.2.
 
 - Issue #8168: py_compile now handles files with utf-8 BOMS.