mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
ngclient: Advisory locking for artifacts
This should prevent issues with multiple processes trying to write at same time. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
This commit is contained in:
parent
6d666968df
commit
7a8edd9830
1 changed files with 1 additions and 0 deletions
|
|
@ -337,6 +337,7 @@ def download_target(
|
|||
|
||||
target_file.seek(0)
|
||||
with open(filepath, "wb") as destination_file:
|
||||
_lock_file(destination_file)
|
||||
shutil.copyfileobj(target_file, destination_file)
|
||||
|
||||
logger.debug("Downloaded target %s", targetinfo.path)
|
||||
|
|
|
|||
Loading…
Reference in a new issue