Skip to content

Commit

Permalink
Document the exception when the target map file is not loaded.
Browse files Browse the repository at this point in the history
If the targets map file cannot be loaded using load_json_file,
a tuf.exceptions.Error exception will be raised.

Signed-off-by: marinamoore <mnm678@gmail.com>
  • Loading branch information
mnm678 committed Sep 21, 2020
1 parent a41deb4 commit facb897
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tuf/client/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,11 @@ def __init__(self, repository_name, repository_mirrors,
If there is an error with the updater's repository files, such
as a missing 'root.json' file.
tuf.exceptions.Error:
If the targets map file cannot be loaded. This may be due to a
securesystemslib.exceptions.Error if the targets map filename
cannot be parsed, or and IOError in the case of runtime exceptions.
<Side Effects>
Th metadata files (e.g., 'root.json', 'targets.json') for the top- level
roles are read from disk and stored in dictionaries. In addition, the
Expand Down

0 comments on commit facb897

Please sign in to comment.