From 0100bd129e8fc809cc5b0258f6c0c7c64ad084ab Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Mon, 15 Apr 2019 11:50:55 +0200
Subject: [PATCH] [buildah] parse container list properly even for scratch ones
Scratch containers dont have id, therefore we shall get container name
as the latest string on each line instead of 5th.
Resolves: #1647
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
---
sos/plugins/buildah.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sos/plugins/buildah.py b/sos/plugins/buildah.py
index c6c57553..fd8653eb 100644
--- a/sos/plugins/buildah.py
+++ b/sos/plugins/buildah.py
@@ -47,7 +47,7 @@ class Buildah(Plugin, RedHatPlugin):
if containahs['is_wicked_pissah']:
for containah in containahs['auutput'].splitlines():
# obligatory Tom Brady
- goat = containah.split()[4]
+ goat = containah.split()[-1]
self.add_cmd_output('buildah inspect -t container %s' % goat)
pitchez = make_chowdah('buildah images -n')
--
2.17.2