summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/macpath.py5
-rw-r--r--Misc/NEWS2
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 15714c6c2c..b22759efc3 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -206,7 +206,10 @@ def realpath(path):
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
diff --git a/Misc/NEWS b/Misc/NEWS
index 4221ee2aad..d8c18c896f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,8 @@ Core and Builtins
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