Update updater.py

This commit is contained in:
Vladimir Diaz 2016-09-01 09:49:59 -04:00 committed by GitHub
parent 4a9e5f1b9a
commit b049c6b59b

View file

@ -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'.