bpo-35306: Avoid raising OSError from pathlib.Path.exists when passed an invalid filename (GH-25529)

This commit is contained in:
Steve Dower 2021-04-22 21:04:44 +01:00 committed by GitHub
parent a911bd15a1
commit 4696f1285d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -33,6 +33,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
)