summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-05 16:37:01 +0200
committerGitHub <noreply@github.com>2019-08-05 16:37:01 +0200
commita15432afe64e0c45b8baf57128f55f18de0ae63a (patch)
tree872b091fbaf03f660079ac86ece199b475a9902c
parent6997dc14886b62c5baef50ba38ce2538ee238019 (diff)
parent1da897d505717d2cc5fecca06ac2c22ebe2bc9b3 (diff)
downloadpodman-a15432afe64e0c45b8baf57128f55f18de0ae63a.tar.gz
podman-a15432afe64e0c45b8baf57128f55f18de0ae63a.tar.bz2
podman-a15432afe64e0c45b8baf57128f55f18de0ae63a.zip
Merge pull request #3718 from QiWang19/df_imgindex
fix system df crashes on unnamed images
-rw-r--r--cmd/podman/system_df.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/system_df.go b/cmd/podman/system_df.go
index 6b9824a79..44582a802 100644
--- a/cmd/podman/system_df.go
+++ b/cmd/podman/system_df.go
@@ -460,11 +460,11 @@ func getImageVerboseDiskUsage(ctx context.Context, images []*image.Image, images
}
var repo string
var tag string
- if len(img.Names()) == 0 {
- repo = "<none>"
- tag = "<none>"
+ var repotags []string
+ if len(img.Names()) != 0 {
+ repotags = []string{img.Names()[0]}
}
- repopairs, err := image.ReposToMap([]string{img.Names()[0]})
+ repopairs, err := image.ReposToMap(repotags)
if err != nil {
logrus.Errorf("error finding tag/digest for %s", img.ID())
}