Skip to content

Key.from_securesystemslib_key() raise ValueError - #1840

Merged
lukpueh merged 1 commit into
theupdateframework:developfrom
MVrachev:from-securesystemslib-key-sslib-error
Feb 8, 2022
Merged

lukpueh merged 1 commit into
theupdateframework:developfrom
MVrachev:from-securesystemslib-key-sslib-error

Conversation

@MVrachev

@MVrachev MVrachev commented Feb 8, 2022 •

Copy link
Copy Markdown
Collaborator

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 [email protected]

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 <[email protected]>
@MVrachev
MVrachev force-pushed the from-securesystemslib-key-sslib-error branch from 78c68f3 to 8b6566a Compare February 8, 2022 11:44
@coveralls

Copy link
Copy Markdown

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

@lukpueh lukpueh left a comment

Copy link
Copy Markdown
Member

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