Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf43b3d5

Browse files
[3.11]bpo-44817: Ignore additional errors in ntpath.realpath (GH-27574) (GH-100022)
(cherry picked from commit124ecd6)Co-authored-by: Michael Förderer <michael.foerderer@gmx.de>
1 parent42fde2d commitf43b3d5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎Lib/ntpath.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,12 +639,15 @@ def _getfinalpathname_nonstrict(path):
639639
# 21: ERROR_NOT_READY (implies drive with no media)
640640
# 32: ERROR_SHARING_VIOLATION (probably an NTFS paging file)
641641
# 50: ERROR_NOT_SUPPORTED
642+
# 53: ERROR_BAD_NETPATH
643+
# 65: ERROR_NETWORK_ACCESS_DENIED
642644
# 67: ERROR_BAD_NET_NAME (implies remote server unavailable)
643645
# 87: ERROR_INVALID_PARAMETER
644646
# 123: ERROR_INVALID_NAME
647+
# 161: ERROR_BAD_PATHNAME
645648
# 1920: ERROR_CANT_ACCESS_FILE
646649
# 1921: ERROR_CANT_RESOLVE_FILENAME (implies unfollowable symlink)
647-
allowed_winerror=1,2,3,5,21,32,50,67,87,123,1920,1921
650+
allowed_winerror=1,2,3,5,21,32,50,53,65,67,87,123,161,1920,1921
648651

649652
# Non-strict algorithm is to find as much of the target directory
650653
# as we can and join the rest.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Ignore WinError 53 (ERROR_BAD_NETPATH), 65 (ERROR_NETWORK_ACCESS_DENIED)
2+
and 161 (ERROR_BAD_PATHNAME) when using ntpath.realpath().

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp