aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2018-11-06 08:13:52 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-12-12 10:08:57 +0000
commit1401c7153dda9bd0558035ba0692cf05a93ca419 (patch)
treef2ea68c61ce1eb23238447b33aa6e1ea6d0ce674
parent0ba743bbf9df335dd47ec45a450e63d72d7ce494 (diff)
downloadsos-1401c7153dda9bd0558035ba0692cf05a93ca419.tar.gz
[podman] allow the plugin for RedHatPlugin and UbuntuPlugin
Until Podman inherits RedHatPlugin and/or UbuntuPlugin, the plugin can not be executed on underlying distros. Further, remove one redundant test as "for container in insp" will work properly also for empty "insp". Resolves: #1473 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/podman.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/sos/plugins/podman.py b/sos/plugins/podman.py
index c43246fc..72e22558 100644
--- a/sos/plugins/podman.py
+++ b/sos/plugins/podman.py
@@ -11,7 +11,7 @@
from sos.plugins import Plugin, RedHatPlugin, UbuntuPlugin
-class Podman(Plugin):
+class Podman(Plugin, RedHatPlugin, UbuntuPlugin):
"""Podman containers
"""
@@ -69,11 +69,10 @@ class Podman(Plugin):
for con in result['output'].splitlines():
insp.add(con)
- if insp:
- for container in insp:
- self.add_cmd_output("podman inspect %s" % container)
- if self.get_option('logs'):
- self.add_cmd_output("podman logs -t %s" % container)
+ for container in insp:
+ self.add_cmd_output("podman inspect %s" % container)
+ if self.get_option('logs'):
+ self.add_cmd_output("podman logs -t %s" % container)
# vim: set et ts=4 sw=4 :