[Python-checkins] r79195 - in python/trunk: Lib/macpath.py Misc/NEWS

florent.xicluna python-checkins at python.org
Sun Mar 21 13:27:20 CET 2010


Author: florent.xicluna
Date: Sun Mar 21 13:27:20 2010
New Revision: 79195

Log:
Issue #8179: Fix macpath.realpath() on a non-existing path.


Modified:
   python/trunk/Lib/macpath.py
   python/trunk/Misc/NEWS

Modified: python/trunk/Lib/macpath.py
==============================================================================
--- python/trunk/Lib/macpath.py	(original)
+++ python/trunk/Lib/macpath.py	Sun Mar 21 13:27:20 2010
@@ -206,7 +206,10 @@
     path = components[0] + ':'
     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

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Sun Mar 21 13:27:20 2010
@@ -24,6 +24,8 @@
 Library
 -------
 
+- Issue #8179: Fix macpath.realpath() on a non-existing path.
+
 - Issue #8024: Update the Unicode database to 5.2.
 
 - Issue #8104: socket.recv_into() and socket.recvfrom_into() now support


More information about the Python-checkins mailing list