Skip to content

Commit

Permalink
envoy.dependency.check: Catch NIST exceptions (#906)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
  • Loading branch information
phlax authored Oct 28, 2023
1 parent e5fa902 commit 1aecd9d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pypi: https://pypi.org/project/aio.api.github

#### [aio.api.nist](aio.api.nist)

version: 0.0.4
version: 0.0.5.dev0

pypi: https://pypi.org/project/aio.api.nist

Expand Down Expand Up @@ -186,15 +186,15 @@ pypi: https://pypi.org/project/envoy.code.check

#### [envoy.dependency.check](envoy.dependency.check)

version: 0.1.11.dev0
version: 0.1.11

pypi: https://pypi.org/project/envoy.dependency.check

##### requirements:

- [abstracts](https://pypi.org/project/abstracts) >=0.0.12
- [aio.api.github](https://pypi.org/project/aio.api.github) >=0.1.6
- [aio.api.nist](https://pypi.org/project/aio.api.nist) >=0.0.3
- [aio.api.nist](https://pypi.org/project/aio.api.nist) >=0.0.4
- [aio.core](https://pypi.org/project/aio.core) >=0.9.1
- [aio.run.checker](https://pypi.org/project/aio.run.checker) >=0.5.7
- [aiohttp](https://pypi.org/project/aiohttp) >=3.8.1
Expand Down
2 changes: 1 addition & 1 deletion aio.api.nist/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.4
0.0.5-dev
2 changes: 1 addition & 1 deletion deps/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
abstracts>=0.0.12
aio.api.bazel>=0.0.2
aio.api.github>=0.2.5
aio.api.nist>=0.0.3
aio.api.nist>=0.0.4
aio.core>=0.10.0
aio.run.checker>=0.5.7
aio.run.runner>=0.3.3
Expand Down
2 changes: 1 addition & 1 deletion envoy.dependency.check/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.11-dev
0.1.11
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import abstracts

from aio.api import github as _github
from aio.api import github as _github, nist
from aio.run import checker
from aio.core.tasks import ConcurrentError, inflate

Expand Down Expand Up @@ -397,7 +397,7 @@ async def on_checks_complete(self) -> int:

@checker.preload(
when=["cves"],
catches=[exceptions.CVECheckError])
catches=[exceptions.CVECheckError, nist.exceptions.NISTError])
async def preload_cves(self) -> None:
async for download in self.cves.downloads:
self.log.debug(f"Preloaded cve data: {download}")
Expand Down
2 changes: 1 addition & 1 deletion envoy.dependency.check/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ packages = find_namespace:
install_requires =
abstracts>=0.0.12
aio.api.github>=0.1.6
aio.api.nist>=0.0.3
aio.api.nist>=0.0.4
aio.core>=0.9.1
aio.run.checker>=0.5.7
aiohttp>=3.8.1
Expand Down
4 changes: 2 additions & 2 deletions envoy.dependency.check/tests/test_abstract_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import abstracts

from aio.api import github
from aio.api import github, nist
from aio.core.functional import async_property
from aio.core.tasks import ConcurrentError
from aio.run.checker import Checker
Expand Down Expand Up @@ -1205,7 +1205,7 @@ async def iter_downloads():
== ())
assert (
ADependencyChecker.preload_cves.catches
== (exceptions.CVECheckError,))
== (exceptions.CVECheckError, nist.exceptions.NISTError))


@pytest.mark.parametrize(
Expand Down

0 comments on commit 1aecd9d

Please sign in to comment.