]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Revert "Fix a glaring error in the logic backport of posixpath."
authorThomas Wouters <thomas@python.org>
Tue, 3 Jun 2025 12:25:37 +0000 (14:25 +0200)
committerThomas Wouters <thomas@python.org>
Tue, 3 Jun 2025 12:25:37 +0000 (14:25 +0200)
This reverts commit b357f2bca375948aca03047d9209ce364e64bfa4, which was
never meant to go into 3.10.

Lib/posixpath.py

index 085a23d8e5934ee34dfbc9834b2c67ebd89ff1d8..e550b470da5bebf60cf2ea4efc2b017520e5d670 100644 (file)
@@ -429,7 +429,9 @@ def _joinrealpath(path, rest, strict, seen):
         newpath = join(path, name)
         try:
             st = os.lstat(newpath)
-        except ignored_error:
+        except OSError:
+            if strict:
+                raise
             is_link = False
         else:
             is_link = stat.S_ISLNK(st.st_mode)