Skip to content

Commit dec0ad5

Browse files
committed
Fix github importer
Signed-off-by: Tushar Goel <[email protected]>
1 parent d0aba20 commit dec0ad5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

vulnerabilities/importers/github.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,6 @@ def get_purl(pkg_type: str, github_name: str) -> Optional[PackageURL]:
216216
logger.error(f"get_purl: Unknown package type {pkg_type}")
217217

218218

219-
class InvalidVersionRange(Exception):
220-
"""
221-
Raises exception when the version range is invalid
222-
"""
223-
224-
225219
def process_response(resp: dict, package_type: str) -> Iterable[AdvisoryData]:
226220
"""
227221
Yield `AdvisoryData` by taking `resp` and `ecosystem` as input
@@ -268,7 +262,7 @@ def process_response(resp: dict, package_type: str) -> Iterable[AdvisoryData]:
268262
affected_range = build_range_from_github_advisory_constraint(
269263
package_type, affected_range
270264
)
271-
except InvalidVersionRange as e:
265+
except Exception as e:
272266
logger.error(f"Could not parse affected range {affected_range!r} {e!r}")
273267
affected_range = None
274268
if fixed_version:

0 commit comments

Comments
 (0)