mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Update updater.py
This commit is contained in:
parent
4a9e5f1b9a
commit
b049c6b59b
1 changed files with 6 additions and 0 deletions
|
|
@ -424,8 +424,14 @@ def _load_metadata_from_file(self, metadata_set, metadata_role):
|
|||
# 'tuf.formats.SIGNABLE_SCHEMA'.
|
||||
try:
|
||||
metadata_signable = tuf.util.load_json_file(metadata_filepath)
|
||||
|
||||
# Although the metadata file may exist locally, it may not
|
||||
# be a valid json file. On the next refresh cycle, it will be
|
||||
# updated as required. If Root if cannot be loaded from disk
|
||||
# successfully, an exception should be raised by the caller.
|
||||
except tuf.Error:
|
||||
return
|
||||
|
||||
tuf.formats.check_signable_object_format(metadata_signable)
|
||||
|
||||
# Extract the 'signed' role object from 'metadata_signable'.
|
||||
|
|
|
|||
Loading…
Reference in a new issue