diff options
-rw-r--r-- | sos/plugins/docker.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sos/plugins/docker.py b/sos/plugins/docker.py index d8851a0a..ef4ede02 100644 --- a/sos/plugins/docker.py +++ b/sos/plugins/docker.py @@ -45,8 +45,7 @@ class Docker(Plugin): result = self.get_command_output(ps_cmd) if result['status'] == 0: - result['output'] = result['output'].split("\n") - for line in result['output'][1:]: + for line in result['output'].splitlines()[1:]: container_id = line.split(" ")[0] self.add_cmd_output([ "{0} logs {1}".format(self.docker_bin, container_id) |