diff options
-rw-r--r-- | cmd/podman/stats.go | 2 | ||||
-rw-r--r-- | libpod/stats.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/stats.go b/cmd/podman/stats.go index 3c2dfb5cf..6a8681028 100644 --- a/cmd/podman/stats.go +++ b/cmd/podman/stats.go @@ -140,7 +140,7 @@ func statsCmd(c *cli.Context) error { containerStats[id] = initialStats } stats, err := ctr.GetContainerStats(containerStats[id]) - if err != nil { + if err != nil && errors.Cause(err) != libpod.ErrNoSuchCtr { return err } // replace the previous measurement with the current one diff --git a/libpod/stats.go b/libpod/stats.go index f4694923c..33e57572c 100644 --- a/libpod/stats.go +++ b/libpod/stats.go @@ -37,7 +37,7 @@ func (c *Container) GetContainerStats(previousStats *ContainerStats) (*Container c.lock.Lock() defer c.lock.Unlock() if err := c.syncContainer(); err != nil { - return stats, errors.Wrapf(err, "error updating container %s state", c.ID()) + return stats, err } if c.state.State != ContainerStateRunning { return stats, nil |