diff options
author | 2021-01-07 14:39:38 +0100 | |
---|---|---|
committer | 2021-01-31 12:02:41 +0100 | |
commit | 7f83ad74675161abeb7ad4a47d2a30a4f4f7510b (patch) | |
tree | afb4de16c1f15098638eca0a5d401409b5c14721 | |
parent | 92bb7938ab3b0f6004137739b01befc3a4aee189 (diff) | |
download | buildroot-7f83ad74675161abeb7ad4a47d2a30a4f4f7510b.tar.gz buildroot-7f83ad74675161abeb7ad4a47d2a30a4f4f7510b.tar.bz2 |
support/scripts/pkg-stats: improvements in is_status_*() methods
Make is_status_ok() work when the given status name is not even listed
in the status dict. This will be necessary for following commits.
Introduced similar methods for the error and na status, which will be
used in following commits.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rwxr-xr-x | support/scripts/pkg-stats | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats index b66064f143..099aacc8d2 100755 --- a/support/scripts/pkg-stats +++ b/support/scripts/pkg-stats @@ -275,7 +275,13 @@ class Package: self.status['developers'] = ("warning", "no developers") def is_status_ok(self, name): - return self.status[name][0] == 'ok' + return name in self.status and self.status[name][0] == 'ok' + + def is_status_error(self, name): + return name in self.status and self.status[name][0] == 'error' + + def is_status_na(self, name): + return name in self.status and self.status[name][0] == 'na' def __eq__(self, other): return self.path == other.path |