mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Merge pull request #1450 from MVrachev/threshold-validation
Metadata API: Add simple threshold validation
This commit is contained in:
commit
6c4e2be196
1 changed files with 2 additions and 0 deletions
|
|
@ -522,6 +522,8 @@ def __init__(
|
|||
f"keyids should be a list of unique strings,"
|
||||
f" instead got {keyids}"
|
||||
)
|
||||
if threshold < 1:
|
||||
raise ValueError("threshold should be at least 1!")
|
||||
self.keyids = keyids_set
|
||||
self.threshold = threshold
|
||||
self.unrecognized_fields: Mapping[str, Any] = unrecognized_fields or {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue