1
0
mirror of https://github.com/restic/restic.git synced 2024-06-27 07:55:08 +02:00

Improve error message when creating lock failed

This commit is contained in:
Alexander Neumann 2017-10-14 14:04:14 +02:00
parent 0e722efb09
commit 67193e3deb

View File

@ -8,6 +8,7 @@ import (
"time" "time"
"github.com/restic/restic/internal/debug" "github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/repository" "github.com/restic/restic/internal/repository"
"github.com/restic/restic/internal/restic" "github.com/restic/restic/internal/restic"
) )
@ -35,7 +36,7 @@ func lockRepository(repo *repository.Repository, exclusive bool) (*restic.Lock,
lock, err := lockFn(context.TODO(), repo) lock, err := lockFn(context.TODO(), repo)
if err != nil { if err != nil {
return nil, err return nil, errors.Fatalf("unable to create lock in backend: %v", err)
} }
debug.Log("create lock %p (exclusive %v)", lock, exclusive) debug.Log("create lock %p (exclusive %v)", lock, exclusive)