mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-35306: Avoid raising OSError from pathlib.Path.exists when passed an invalid filename (GH-25529)
(cherry picked from commit 4696f1285d
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
8e7cebb497
commit
ab5d78ce41
2 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Avoid raising errors from :meth:`pathlib.Path.exists()` when passed an
|
||||
invalid filename.
|
Loading…
Add table
Add a link
Reference in a new issue