diff options
-rw-r--r-- | cmd/podman/ps.go | 6 | ||||
-rw-r--r-- | libpod/boltdb_state.go | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go index ca20f3f33..aa544e6d1 100644 --- a/cmd/podman/ps.go +++ b/cmd/podman/ps.go @@ -200,6 +200,12 @@ func psCmd(c *cli.Context) error { } containers, err := runtime.GetContainers(filterFuncs...) + if err != nil { + return err + } + + // TODO: Latest and Last are broken right now due to lack of container + // ordering var outputContainers []*libpod.Container if opts.Latest && len(containers) > 0 { outputContainers = append(outputContainers, containers[0]) diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index 805ff90fd..77a17ce12 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -620,7 +620,7 @@ func (s *BoltState) AllContainers() ([]*Container, error) { return err } - err = allCtrsBucket.ForEach(func(id, name []byte) error { + return allCtrsBucket.ForEach(func(id, name []byte) error { // If performance becomes an issue, this check can be // removed. But the error messages that come back will // be much less helpful. @@ -637,7 +637,6 @@ func (s *BoltState) AllContainers() ([]*Container, error) { return s.getContainerFromDB(id, ctr, ctrBucket) }) - return err }) if err != nil { return nil, err |