Adjust to removals from securesystemslib#855
Conversation
a0b52b4 to
d02ac94
Compare
d02ac94 to
0b592b9
Compare
Removal of securesystemslib exceptions that are TUF-specific occurs in securesystemslib PR #165 secure-systems-lab/securesystemslib#165 This commit adapts to those changes. Exceptions that are specific to TUF should be in TUF and not in securesystemslib. This commit uses those already-existing TUF exceptions instead of pointing to securesystemslib exceptions that will be removed. For example, securesystemslib has no notion of repositories, so it's ridiculous to have a RepositoryError in securesystemslib and ridiculous for TUF to use securesystemslib.exceptions.RepositoryError. Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
0b592b9 to
a9d7053
Compare
lukpueh
left a comment
There was a problem hiding this comment.
After rebasing to solve a minor docstring conflict this PR looks good to me:
secure-systems-lab/securesystemslib#165 removed the following custom error classes from securesystemslib as TUF-specific:
BadVersionNumberError, DownloadError, ExpiredMetadataError, ForbiddenTargetError, InsufficientKeysError, KeyAlreadyExistsError, RepositoryError, RoleAlreadyExistsError, UnknownKeyError, UnknownRoleError, UnknownTargetError
All these error classes already existed in tuf.exceptions, and were either already used from there:
DownloadError, ExpiredMetadataError, ForbiddenTargetError, RoleAlreadyExistsError
... or are now (with this PR):
BadVersionNumberError, InsufficientKeysError, KeyAlreadyExistsError, RepositoryError, UnknownKeyError, UnknownRoleError, UnknownTargetError
Removal of securesystemslib exceptions that are TUF-specific occurs in securesystemslib PR #165.
This PR adapts to those changes. Exceptions that are specific to TUF should be in TUF and not in securesystemslib. This commit uses those already-existing TUF exceptions instead of pointing to securesystemslib exceptions that will be removed.
For example, securesystemslib has no notion of repositories, so it's clearly wrong to have a
RepositoryErrorin securesystemslib and clearly wrong for TUF to usesecuresystemslib.exceptions.RepositoryError.