summaryrefslogtreecommitdiff
path: root/libpod/lock/file
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-06 10:15:04 +0200
committerGitHub <noreply@github.com>2020-10-06 10:15:04 +0200
commit80a2317ca20b0e5e1cd064a8962beed642be3a36 (patch)
tree0730915a611542bf028d5b9c66ace1390a6c036f /libpod/lock/file
parentf584d47a9d0c050c3b39793a73b0aba17b45e8ba (diff)
parentd4aa89bb40b3a2c1730c9bff31a681007a3feb97 (diff)
downloadpodman-80a2317ca20b0e5e1cd064a8962beed642be3a36.tar.gz
podman-80a2317ca20b0e5e1cd064a8962beed642be3a36.tar.bz2
podman-80a2317ca20b0e5e1cd064a8962beed642be3a36.zip
Merge pull request #7929 from kolyshkin/nits-err
Nits
Diffstat (limited to 'libpod/lock/file')
-rw-r--r--libpod/lock/file/file_lock.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/lock/file/file_lock.go b/libpod/lock/file/file_lock.go
index e50d67321..2643c9211 100644
--- a/libpod/lock/file/file_lock.go
+++ b/libpod/lock/file/file_lock.go
@@ -26,7 +26,7 @@ func CreateFileLock(path string) (*FileLocks, error) {
return nil, errors.Wrapf(syscall.EEXIST, "directory %s exists", path)
}
if err := os.MkdirAll(path, 0711); err != nil {
- return nil, errors.Wrapf(err, "cannot create %s", path)
+ return nil, err
}
locks := new(FileLocks)
@@ -40,7 +40,7 @@ func CreateFileLock(path string) (*FileLocks, error) {
func OpenFileLock(path string) (*FileLocks, error) {
_, err := os.Stat(path)
if err != nil {
- return nil, errors.Wrapf(err, "accessing directory %s", path)
+ return nil, err
}
locks := new(FileLocks)
@@ -84,7 +84,7 @@ func (locks *FileLocks) AllocateLock() (uint32, error) {
if os.IsExist(err) {
continue
}
- return 0, errors.Wrapf(err, "creating lock file")
+ return 0, errors.Wrap(err, "creating lock file")
}
f.Close()
break