[stable-2.8] Handle new output for podman image build (#59807)

(cherry picked from commit 372f21e3b5)

Co-authored-by: Sam Doran <sdoran@redhat.com>
This commit is contained in:
Sam Doran 2019-08-02 00:55:32 -04:00 committed by Toshio Kuratomi
parent 24a4b1d9e7
commit a55d6c37ec
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- podman_image - handle new output format for image build

View file

@ -416,6 +416,10 @@ class PodmanImageManager(object):
splitline = line.rsplit(split_on, maxsplit)
layer_ids.append(splitline[1])
# Podman 1.4 changed the output to only include the layer id when run in quiet mode
if not layer_ids:
layer_ids = lines.splitlines()
return(layer_ids[-1])
def present(self):