Skip to content

Commit

Permalink
Merge pull request #1359 from sechkova/metadata-version
Browse files Browse the repository at this point in the history
Fix api/metadata version check
  • Loading branch information
Jussi Kukkonen authored Apr 26, 2021
2 parents feb340f + 92257a8 commit ec7173f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tuf/api/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ def __init__(
self.expires = expires

# TODO: Should we separate data validation from constructor?
if version < 0:
raise ValueError(f"version must be >= 0, got {version}")
if version <= 0:
raise ValueError(f"version must be > 0, got {version}")
self.version = version
self.unrecognized_fields = unrecognized_fields or {}

Expand Down

0 comments on commit ec7173f

Please sign in to comment.