diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-21 12:27:20 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-21 12:27:20 (GMT) |
commit | cf82fa6f919b4e5a48d25f5c99c30ae9363b2508 (patch) | |
tree | 56b01131bd072a82d4c2540c0b13c0d4cfed293b | |
parent | b88fbf4fef9e03cfe9121dc03d935c9a90ff19b1 (diff) | |
download | cpython-cf82fa6f919b4e5a48d25f5c99c30ae9363b2508.zip cpython-cf82fa6f919b4e5a48d25f5c99c30ae9363b2508.tar.gz cpython-cf82fa6f919b4e5a48d25f5c99c30ae9363b2508.tar.bz2 |
Issue #8179: Fix macpath.realpath() on a non-existing path.
-rw-r--r-- | Lib/macpath.py | 5 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py index 15714c6..b22759e 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 @@ -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 |