Skip to content

Commit 68a0b6f

Browse files
committed
WIP: more windoes shenanigans
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
1 parent a8d2e81 commit 68a0b6f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_updater_top_level_update.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ def test_load_metadata_from_cache(self, wrapped_open: MagicMock) -> None:
712712
root_dir = os.path.join(self.metadata_dir, "root_history")
713713
wrapped_open.assert_has_calls(
714714
[
715-
call(os.path.join(self.metadata_dir, ".lock"), "x+b"),
715+
call(os.path.join(self.metadata_dir, ".lock"), "a+"),
716716
call(os.path.join(root_dir, "2.root.json"), "rb"),
717717
call(os.path.join(self.metadata_dir, "timestamp.json"), "rb"),
718718
call(os.path.join(self.metadata_dir, "snapshot.json"), "rb"),

tuf/ngclient/updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _lock_file(f: IO) -> None:
8989

9090
def _lock_file(f: IO) -> None:
9191
# On Windows we lock a byte range and file must not be empty
92-
f.write(b"\0")
92+
f.write(" ")
9393
f.flush()
9494
f.seek(0)
9595

0 commit comments

Comments
 (0)