aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/kernel.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py
index 719a6e1c..73109326 100644
--- a/sos/plugins/kernel.py
+++ b/sos/plugins/kernel.py
@@ -34,7 +34,8 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
self._log_info("Could not parse bpftool prog list as JSON: %s" % e)
return out
for item in range(len(prog_data)):
- out.append(prog_data[item]["id"])
+ if "id" in prog_data[item]:
+ out.append(prog_data[item]["id"])
return out
def get_bpftool_map_ids(self, map_file):
@@ -45,7 +46,8 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
self._log_info("Could not parse bpftool map list as JSON: %s" % e)
return out
for item in range(len(map_data)):
- out.append(map_data[item]["id"])
+ if "id" in map_data[item]:
+ out.append(map_data[item]["id"])
return out
def setup(self):