Skip to content

Commit

Permalink
Fix for NoneType is not iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-safetycli committed Dec 19, 2024
1 parent ee97021 commit 97f457b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion safety/scan/ecosystems/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def ignore_vuln_if_needed(

spec_ignored: bool = False

if vuln_id in ignore_vulns.keys() and str(specification.specifier) in ignore_vulns[vuln_id].specifications:
vuln = ignore_vulns.get(vuln_id)
if vuln is not None and vuln.specifications is not None and str(specification.specifier) in vuln.specifications:
spec_ignored = True

if (not spec_ignored) and \
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ classifiers =
[options]
zip_safe = False
include_package_data = True
packages = safety, safety.formatters,safety.formatters.schemas, safety.alerts, safety.auth, safety.scan, safety.scan.finder, safety.scan.ecosystems, safety.scan.ecosystems.python, safety.alerts.templates, safety.templates
packages = safety, safety.formatters,safety.formatters.schemas, safety.alerts, safety.auth, safety.scan, safety.scan.finder, safety.scan.ecosystems, safety.scan.ecosystems.python, safety.alerts.templates, safety.templates, safety.scan.fun_mode
python_requires = >=3.7
package_dir =
safety = safety
Expand Down

0 comments on commit 97f457b

Please sign in to comment.