Skip to content

Commit 0b08b0c

Browse files
committed
warehouse: Delete tuf.models, use tuf.repository config for CLI
1 parent 640b53c commit 0b08b0c

File tree

2 files changed

+7
-80
lines changed

2 files changed

+7
-80
lines changed

warehouse/cli/tuf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from warehouse.cli import warehouse
1818
from warehouse.tuf import BIN_N_ROLE, BINS_ROLE, TOPLEVEL_ROLES, utils
1919

20-
TUF_REPO = "warehouse/tuf/dist"
20+
# TUF_REPO = "warehouse/tuf/dist"
2121

2222

2323
def _make_backsigned_fileinfo_from_file(file):
@@ -59,7 +59,9 @@ def new_repo(config):
5959
Initialize the TUF repository from scratch, including a brand new root.
6060
"""
6161

62-
repository = repository_tool.create_new_repository(TUF_REPO)
62+
repository = repository_tool.create_new_repository(
63+
config.registry.settings["tuf.repository"]
64+
)
6365

6466
for role in TOPLEVEL_ROLES:
6567
key_service = _key_service_for_role(config, role)
@@ -94,7 +96,9 @@ def build_targets(config):
9496
targets role (bins) and its hashed bin delegations (each bin-n).
9597
"""
9698

97-
repository = repository_tool.load_repository(TUF_REPO)
99+
repository = repository_tool.load_repository(
100+
config.registry.settings["tuf.repository"]
101+
)
98102

99103
# Load signing keys. We do this upfront for the top-level roles.
100104
for role in ["snapshot", "targets", "timestamp"]:

warehouse/tuf/models.py

Lines changed: 0 additions & 77 deletions
This file was deleted.

0 commit comments

Comments
 (0)