mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
This likely fails on all platforms right now, but the Windows behaviour cannot be fixed without actual locking. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
15 lines
407 B
Python
15 lines
407 B
Python
import sys
|
|
|
|
from tuf.ngclient import Updater
|
|
|
|
print(f"Creating and refreshing a client {sys.argv[1]} times:")
|
|
print(f" metadata dir: {sys.argv[2]}")
|
|
print(f" metadata url: {sys.argv[3]}")
|
|
|
|
|
|
for i in range(int(sys.argv[1])):
|
|
try:
|
|
u = Updater(metadata_dir=sys.argv[2], metadata_base_url=sys.argv[3])
|
|
u.refresh()
|
|
except OSError as e:
|
|
sys.exit(f"Failed on iteration {i}: {e}")
|