Skip to content

Commit d6d1506

Browse files
committed
WIP try without write & flush
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
1 parent 1a39c1a commit d6d1506

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

tuf/ngclient/updater.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ def _lock_file(path: str) -> Iterator[IO]:
108108
for _ in range(100):
109109
try:
110110
with open(path, "wb") as f:
111-
# file must not be empty
112-
f.write(b"\0")
113-
f.flush()
114-
f.seek(0)
115111
msvcrt.locking(f.fileno(), msvcrt.LK_LOCK, 1)
116112
locked = True
117113
yield f

0 commit comments

Comments
 (0)