Skip to content

Raise NotImplementedError in ScoringSystem.get and compute - #2553

Open
sc-lacanlale wants to merge 1 commit into
aboutcode-org:mainfrom
sc-lacanlale:fix/raise-not-implemented-scoring-system
Open

sc-lacanlale wants to merge 1 commit into
aboutcode-org:mainfrom
sc-lacanlale:fix/raise-not-implemented-scoring-system

Conversation

@sc-lacanlale

Copy link
Copy Markdown

Fixes #2552

ScoringSystem.compute(), ScoringSystem.get(), and EPSSScoringSystem.compute() used return NotImplementedError instead of raise NotImplementedError, so callers catching NotImplementedError received the truthy exception class instead of skipping unsupported scoring systems.

Changes:

  • Change return NotImplementedError to raise NotImplementedError in vulnerabilities/severity_systems.py.
  • Add unit tests in vulnerabilities/tests/test_get_serverity.py for unimplemented ScoringSystem, EPSS, and SSVC methods.

Fixes aboutcode-org#2552

Signed-off-by: Shanley Clarence <115960237+sc-lacanlale@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

ScoringSystem.get() and compute() return NotImplementedError instead of raising it

1 participant