summaryrefslogtreecommitdiffstats
path: root/Lib/pathlib.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-04-22 20:30:29 (GMT)
committerGitHub <noreply@github.com>2021-04-22 20:30:29 (GMT)
commitab5d78ce4141a6b3cd55588cdbe3cd3bd5242d5b (patch)
treef0fc1941b660fbbf2202f26abfc46c4f09ab044f /Lib/pathlib.py
parent8e7cebb497e6004715a5475f6b53d8ef9d30a9fa (diff)
downloadcpython-ab5d78ce4141a6b3cd55588cdbe3cd3bd5242d5b.zip
cpython-ab5d78ce4141a6b3cd55588cdbe3cd3bd5242d5b.tar.gz
cpython-ab5d78ce4141a6b3cd55588cdbe3cd3bd5242d5b.tar.bz2
bpo-35306: Avoid raising OSError from pathlib.Path.exists when passed an invalid filename (GH-25529)
(cherry picked from commit 4696f1285d83dd7b69f459c63e14080b1f87f797) Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'Lib/pathlib.py')
-rw-r--r--Lib/pathlib.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index da51a4f..756d389 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -39,6 +39,7 @@ _IGNORED_ERROS = (ENOENT, ENOTDIR, EBADF, ELOOP)
_IGNORED_WINERRORS = (
21, # ERROR_NOT_READY - drive exists but is not accessible
+ 123, # ERROR_INVALID_NAME - fix for bpo-35306
1921, # ERROR_CANT_RESOLVE_FILENAME - fix for broken symlink pointing to itself
)