summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-15 13:42:36 -0700
committerGitHub <noreply@github.com>2020-04-15 13:42:36 -0700
commit6e9622aa987bba37026fe628bffb5958d4cf64cb (patch)
tree90389ebb3a7ba54080cec8c05bca4435f3e66bba /libpod
parent195cb11276d61311bbd2b5274ac7a98b62abaaba (diff)
parentec4060aef6c77c049fc2c3b6438ebb5590f6ab69 (diff)
downloadpodman-6e9622aa987bba37026fe628bffb5958d4cf64cb.tar.gz
podman-6e9622aa987bba37026fe628bffb5958d4cf64cb.tar.bz2
podman-6e9622aa987bba37026fe628bffb5958d4cf64cb.zip
Merge pull request #5775 from sujil02/v2-container-prune
Ability to prune container in api V2
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime_ctr.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 207ac6477..9d3e69d56 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -887,8 +887,9 @@ func (r *Runtime) PruneContainers(filterFuncs []ContainerFilter) (map[string]int
continue
}
err = r.RemoveContainer(context.Background(), ctr, false, false)
- pruneErrors[ctr.ID()] = err
if err != nil {
+ pruneErrors[ctr.ID()] = err
+ } else {
prunedContainers[ctr.ID()] = size
}
}