Skip to content

Commit 6c07b78

Browse files
authored
Catch NotImplementedError (#1700)
* Catch NotImplementedError Signed-off-by: Jono Yang <jyang@nexb.com> * Update CHANGELOG.rst Signed-off-by: Jono Yang <jyang@nexb.com> --------- Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 001b91c commit 6c07b78

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ v35.0.0 (2025-06-23)
3636
- Add "Package Compliance Alert" chart in the Policies section.
3737
https://github.com/aboutcode-org/scancode.io/pull/1699
3838

39+
- Catch ``NotImplementedError`` in ``get_unique_unresolved_purls`` and properly
40+
log error in project.
41+
https://github.com/aboutcode-org/scancode.io/pull/1700
42+
3943
v34.11.0 (2025-05-02)
4044
---------------------
4145

scanpipe/pipes/purldb.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,12 @@ def get_unique_unresolved_purls(project):
318318

319319
try:
320320
vers = range_class.from_native(extracted_requirement)
321-
except (InvalidVersionRange, InvalidVersion) as exception:
322-
if exception is InvalidVersionRange:
321+
except (
322+
InvalidVersionRange,
323+
InvalidVersion,
324+
NotImplementedError,
325+
) as exception:
326+
if exception in (InvalidVersionRange, NotImplementedError):
323327
description = "Version range is invalid or unsupported"
324328
else:
325329
description = "Extracted requirement is not a valid version"

0 commit comments

Comments
 (0)