Merge pull request #818 from vicki-c/master

fixing etcd missing key error
This commit is contained in:
Jeff Mitchell 2015-12-07 15:29:15 -05:00
commit 9976d86cc6
1 changed files with 2 additions and 2 deletions

View File

@ -53,8 +53,8 @@ var (
// errorIsMissingKey returns true if the given error is an etcd error with an
// error code corresponding to a missing key.
func errorIsMissingKey(err error) bool {
etcdErr, ok := err.(*client.Error)
return ok && etcdErr.Code == 100
etcdErr, ok := err.(client.Error)
return ok && etcdErr.Code == client.ErrorCodeKeyNotFound
}
// EtcdBackend is a physical backend that stores data at specific