mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Fix error with images info where no images (#233)
This commit is contained in:
parent
46020ecf80
commit
2b456dfe8c
2 changed files with 17 additions and 5 deletions
|
|
@ -197,10 +197,12 @@ 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.strip().split('\n')
|
||||
out = get_image_info(module, executable, name)
|
||||
|
||||
return out
|
||||
out = out.strip()
|
||||
if out:
|
||||
name = out.split('\n')
|
||||
res = get_image_info(module, executable, name)
|
||||
return res
|
||||
return json.dumps([])
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue