summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2019-10-14 13:49:06 -0400
committerNalin Dahyabhai <nalin@redhat.com>2019-10-14 13:49:06 -0400
commit17a7596af4f8e2898bd11945a5b3c085b882b021 (patch)
tree49bd3ac19c98fd1f018b7a12e738a0097f7cd0ce /libpod/container_internal.go
parent3e45d0730b4a17a91912eb161de30cb88e76bb33 (diff)
downloadpodman-17a7596af4f8e2898bd11945a5b3c085b882b021.tar.gz
podman-17a7596af4f8e2898bd11945a5b3c085b882b021.tar.bz2
podman-17a7596af4f8e2898bd11945a5b3c085b882b021.zip
Unwrap errors before comparing them
Unwrap errors before directly comparing them with errors defined by the storage and image libraries. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index e7f541c52..a7ac23f73 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -533,7 +533,7 @@ func (c *Container) teardownStorage() error {
// error - we wanted it gone, it is already gone.
// Potentially another tool using containers/storage already
// removed it?
- if err == storage.ErrNotAContainer || err == storage.ErrContainerUnknown {
+ if errors.Cause(err) == storage.ErrNotAContainer || errors.Cause(err) == storage.ErrContainerUnknown {
logrus.Warnf("Storage for container %s already removed", c.ID())
return nil
}