From a4fb158e15d8a0b9e218bf9d8ff5085a9d68b03d Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 17 Nov 2026 09:03:02 +0100 Subject: [PATCH] refactor: keep the nt test of the partial lock --- install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.py b/install.py index c1657f4b8..9be030a2d 100644 --- a/install.py +++ b/install.py @@ -8590,7 +8590,7 @@ def _claim_partial(path: Path) -> BinaryIO | None: flags = os.O_RDWR | os.O_CREAT | getattr(os, "O_NOFOLLOW", 0) | getattr(os, "O_BINARY", 0) handle = os.fdopen(os.open(path, flags, 0o644), "r+b") try: - if sys.platform == "win32": + if os.name == "nt": import msvcrt msvcrt.locking(handle.fileno(), msvcrt.LK_NBLCK, 1)