From b049c6b59b5993207ef264d37f8a4a14237ea012 Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Thu, 1 Sep 2016 09:49:59 -0400 Subject: [PATCH] Update updater.py --- tuf/client/updater.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tuf/client/updater.py b/tuf/client/updater.py index 6672e2ed..76e0a94e 100755 --- a/tuf/client/updater.py +++ b/tuf/client/updater.py @@ -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'.