From 7ab75fa531d66e278e6a74e628b49f81d4e05bc9 Mon Sep 17 00:00:00 2001 From: dachshund Date: Fri, 6 Sep 2013 11:17:33 -0400 Subject: [PATCH] Remove MetadataNotAvailableError. --- tuf/__init__.py | 8 -------- tuf/client/updater.py | 11 +++++------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/tuf/__init__.py b/tuf/__init__.py index c3933ca6..69d01792 100755 --- a/tuf/__init__.py +++ b/tuf/__init__.py @@ -125,14 +125,6 @@ class ExpiredMetadataError(Error): -class MetadataNotAvailableError(Error): - """Indicate an error locating a Metadata file for a specified target/role.""" - pass - - - - - class CryptoError(Error): """Indicate any cryptography-related errors.""" pass diff --git a/tuf/client/updater.py b/tuf/client/updater.py index 2f8a0083..45f333ba 100755 --- a/tuf/client/updater.py +++ b/tuf/client/updater.py @@ -936,7 +936,7 @@ def _update_metadata_if_changed(self, metadata_role, referenced_metadata='releas is 'timestamp'. See refresh(). - tuf.MetadataNotAvailableError: + tuf.UpdateError: If 'metadata_role' could not be downloaded after determining that it had changed. @@ -1868,11 +1868,10 @@ def _preorder_depth_first_walk(self, target_filepath): role_names = ['targets'] # Ensure the client has the most up-to-date version of 'targets.txt'. - # Raise 'tuf.MetadataNotAvailableError' if the changed metadata - # cannot be successfully downloaded and 'tuf.RepositoryError' if the - # referenced metadata is missing. Target methods such as this one - # are called after the top-level metadata have been refreshed (i.e., - # updater.refresh()). + # Raise 'tuf.UpdateError' if the changed metadata cannot be successfully + # downloaded and 'tuf.RepositoryError' if the referenced metadata is + # missing. Target methods such as this one are called after the top-level + # metadata have been refreshed (i.e., updater.refresh()). self._update_metadata_if_changed('targets') # Preorder depth-first traversal of the tree of target delegations.