support/scripts/pkg-stats: fix the status reporting of CVEs
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 7 Jan 2021 13:39:39 +0000 (14:39 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 31 Jan 2021 11:02:42 +0000 (12:02 +0100)
commit68364a4b58dfd8fcacfc078329cd6c6275a00fd1
tree6b4bfc7ad4294a60e4d98a68ba77dd341b97ab90
parent7f83ad74675161abeb7ad4a47d2a30a4f4f7510b
support/scripts/pkg-stats: fix the status reporting of CVEs

Since commit bd665d182c8131d2deafa39be0f3d89adb43643f
("support/scripts/pkg-stats: improve rendering of CVE information"),
we have better reporting of CVE related information, based on
pkg.status['cve']. However, this commit broke pkg-stats when the
--nvd-path option is not passed, and therefore no CVE information is
available.

This commit fixes that, by making use of the is_status_ok(),
is_status_error() and is_status_na() methods recently introduced.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
support/scripts/pkg-stats