From cdb447bba2b00dfd8f473a38b75115d1cd6ee799 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 14 Jun 2018 12:41:38 -0400 Subject: Correctly report errors retrieving containers in ps Signed-off-by: Matthew Heon Closes: #944 Approved by: rhatdan --- libpod/boltdb_state.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libpod') 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 -- cgit v1.2.3-54-g00ecf