Skip to content

Commit

Permalink
Simplifies Timestamp.update method
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
  • Loading branch information
lukpueh committed Aug 20, 2020
1 parent 07cccd0 commit 22e8ea9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tuf/api/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ def as_dict(self) -> JsonDict:

# Update metadata about the snapshot metadata.
def update(self, version: int, length: int, hashes: JsonDict) -> None:
fileinfo = self.meta.get('snapshot.json', {})
fileinfo['version'] = version
fileinfo['length'] = length
fileinfo['hashes'] = hashes
self.meta['snapshot.json'] = fileinfo
self.meta['snapshot.json'] = {
'version': version,
'length': length,
'hashes': hashes
}


class Snapshot(Signed):
Expand Down

0 comments on commit 22e8ea9

Please sign in to comment.