[stable-2.8] Fix podman_image_info parsing of podman output.

Stripping the output from `podman image ls -q` prevents passing
a blank image ID to `podman image inspect`, which would fail.
(cherry picked from commit a05be890ad)

Co-authored-by: Matt Clay <matt@mystile.com>
This commit is contained in:
Matt Clay 2019-06-05 14:05:26 -07:00
parent 318f46c829
commit 33c8f9d224

View file

@ -173,7 +173,7 @@ def get_image_info(module, executable, name):
def get_all_image_info(module, executable):
command = [executable, 'image', 'ls', '-q']
rc, out, err = module.run_command(command)
name = out.split('\n')
name = out.strip().split('\n')
out = get_image_info(module, executable, name)
return out