Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into introduce-model
Browse files Browse the repository at this point in the history
# Conflicts:
#	modelscan/modelscan.py
#	modelscan/scanners/pickle/scan.py
  • Loading branch information
asofter committed Mar 19, 2024
2 parents b7e0e3f + 7536ddc commit c110330
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion modelscan/modelscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,22 @@ def _scan_source(
scanned = False
for scan_class in self._scanners_to_run:
scanner = scan_class(self._settings) # type: ignore[operator]
scan_results = scanner.scan(model)

try:
scan_results = scanner.scan(model)
except Exception as e:
logger.error(
f"Error encountered from scanner {scanner.full_name()} with path {str(model.get_source())}: {e}"
)
self._errors.append(
ModelScanError(
scanner.full_name(),
ErrorCategories.MODEL_SCAN,
f"Error encountered from scanner {scanner.full_name()}: {e}",
str(model.get_source()),
)
)
continue

if scan_results is not None:
scanned = True
Expand Down

0 comments on commit c110330

Please sign in to comment.