10000 Move back in except · python/cpython@9d18f8c · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d18f8c

Browse files
committed
Move back in except
1 parent 9905730 commit 9d18f8c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Lib/ntpath.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,10 +688,8 @@ def _getfinalpathname_nonstrict(path):
688688
path = _getfinalpathname(path)
689689
return join(path, tail) if tail else path
690690
except OSError as ex:
691-
winerror = ex.winerror
692-
if winerror not in allowed_winerror:
691+
if ex.winerror not in allowed_winerror:
693692
raise
694-
if True: # Indent for git blame
695693
try:
696694
# The OS could not resolve this path fully, so we attempt
697695
# to follow the link ourselves. If we succeed, join the tail
@@ -703,7 +701,7 @@ def _getfinalpathname_nonstrict(path):
703701
# If we fail to readlink(), let's keep traversing
704702
pass
705703
# If we get these errors, try to get the real name of the file without accessing it.
706-
if winerror in (1, 5, 32, 50, 87, 1920, 1921):
704+
if ex.winerror in (1, 5, 32, 50, 87, 1920, 1921):
707705
try:
708706
name = _findfirstfile(path)
709707
path, _ = split(path)

0 commit comments

Comments
 (0)
0