errors: fix error cause comparison

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2019-03-11 10:08:31 +01:00
parent 349e691149
commit e22fc79f39
No known key found for this signature in database
GPG key ID: E4730F97F60286ED

View file

@ -1086,7 +1086,7 @@ func (c *Container) cleanupStorage() error {
// error
// We still want to be able to kick the container out of the
// state
if err == storage.ErrNotAContainer || err == storage.ErrContainerUnknown {
if errors.Cause(err) == storage.ErrNotAContainer || errors.Cause(err) == storage.ErrContainerUnknown {
logrus.Errorf("Storage for container %s has been removed", c.ID())
return nil
}