summaryrefslogtreecommitdiff
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index f0e03a2f49..0e6de2829f 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -229,7 +229,7 @@ def islink(path):
"""
try:
st = os.lstat(path)
- except (OSError, AttributeError):
+ except (OSError, ValueError, AttributeError):
return False
return stat.S_ISLNK(st.st_mode)
@@ -239,7 +239,7 @@ def lexists(path):
"""Test whether a path exists. Returns True for broken symbolic links"""
try:
st = os.lstat(path)
- except OSError:
+ except (OSError, ValueError):
return False
return True
@@ -524,7 +524,7 @@ else: # use native Windows method on Windows
"""Return the absolute version of a path."""
try:
return _getfullpathname(path)
- except OSError:
+ except (OSError, ValueError):
return _abspath_fallback(path)
# realpath is a no-op on systems without islink support