diff options
-rw-r--r-- | cmd/podman/ps.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go index 26991af4b..4dd7133bc 100644 --- a/cmd/podman/ps.go +++ b/cmd/podman/ps.go @@ -405,6 +405,14 @@ func getTemplateOutput(containers []*libpod.Container, opts psOptions) ([]psTemp for _, ctr := range containers { batchInfo, err := batchContainerOp(ctr, opts) if err != nil { + // If the error was ErrNoSuchCtr, it was probably + // removed sometime after we got the initial list. + // Just ignore it. + if errors.Cause(err) == libpod.ErrNoSuchCtr { + logrus.Debugf("Container %s removed before batch, ignoring in output", ctr.ID()) + continue + } + return nil, err } ctrID := ctr.ID() |