Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key.from_securesystemslib_key() raise ValueError #1840

Conversation

MVrachev
Copy link
Collaborator

@MVrachev MVrachev commented Feb 8, 2022

Fixes #1818

Description of the changes being introduced by the pull request:

If a securesystemslib.FormatError is raised inside
Key.from_securesystemslib_key() then reraise ValueError.
This is done so that our users don't have to import securesystemslib
in order to handle the error and because the securesystemslib error
itself is securesystemslib implementation-specific.

Signed-off-by: Martin Vrachev mvrachev@vmware.com

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

If a securesystemslib.FormatError is raised inside
Key.from_securesystemslib_key() then reraise ValueError.
This is done so that our users don't have to import securesystemslib
in order to handle the error and because the securesystemslib error
itself is securesystemslib implementation-specific.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
@MVrachev MVrachev force-pushed the from-securesystemslib-key-sslib-error branch from 78c68f3 to 8b6566a Compare February 8, 2022 11:44
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1812038548

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 98.346%

Totals Coverage Status
Change from base Build 1811924744: 0.003%
Covered Lines: 1121
Relevant Lines: 1137

💛 - Coveralls

Copy link
Member

@lukpueh lukpueh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lukpueh lukpueh merged commit 177976a into theupdateframework:develop Feb 8, 2022
@MVrachev MVrachev deleted the from-securesystemslib-key-sslib-error branch February 8, 2022 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metadata API: from_securesystemslib_key() should handle sslib error
3 participants