diff options
| author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-30 19:52:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-30 19:52:17 +0100 |
| commit | 1fe79dd677c75af3915418d96f12b6f4a75ee568 (patch) | |
| tree | 7eac63217e5cb71d03cab39120e8b1fc417134e1 /libpod/util.go | |
| parent | 3653e57a2a589bebfdde99fb3c0334d04f350888 (diff) | |
| parent | 831d7fb0d7ee007fc04b1b0ff24b77c7d5635f5e (diff) | |
| download | podman-1fe79dd677c75af3915418d96f12b6f4a75ee568.tar.gz podman-1fe79dd677c75af3915418d96f12b6f4a75ee568.tar.bz2 podman-1fe79dd677c75af3915418d96f12b6f4a75ee568.zip | |
Merge pull request #8177 from rhatdan/wrap
Stop excessive wrapping of errors
Diffstat (limited to 'libpod/util.go')
| -rw-r--r-- | libpod/util.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/util.go b/libpod/util.go index 585b07aca..c26039c50 100644 --- a/libpod/util.go +++ b/libpod/util.go @@ -74,7 +74,7 @@ func WaitForFile(path string, chWait chan error, timeout time.Duration) (bool, e return false, nil } if !os.IsNotExist(err) { - return false, errors.Wrapf(err, "checking file %s", path) + return false, err } case <-time.After(25 * time.Millisecond): // Check periodically for the file existence. It is needed @@ -86,7 +86,7 @@ func WaitForFile(path string, chWait chan error, timeout time.Duration) (bool, e return false, nil } if !os.IsNotExist(err) { - return false, errors.Wrapf(err, "checking file %s", path) + return false, err } case <-timeoutChan: return false, errors.Wrapf(define.ErrInternal, "timed out waiting for file %s", path) @@ -184,11 +184,11 @@ func DefaultSeccompPath() (string, error) { return config.SeccompOverridePath, nil } if !os.IsNotExist(err) { - return "", errors.Wrapf(err, "can't check if %q exists", config.SeccompOverridePath) + return "", err } if _, err := os.Stat(config.SeccompDefaultPath); err != nil { if !os.IsNotExist(err) { - return "", errors.Wrapf(err, "can't check if %q exists", config.SeccompDefaultPath) + return "", err } return "", nil } |
