From 14b14b8f21db24d14d61413a611dd34fb65a0182 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 19 Jul 2016 10:24:55 +0100 Subject: [PATCH] Detect problems with connecting to data stores --- kvs/db.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kvs/db.go b/kvs/db.go index cfa6ce13..dc4b1f05 100644 --- a/kvs/db.go +++ b/kvs/db.go @@ -64,7 +64,10 @@ func (db *DB) enc(opts *cnf.Options) (err error) { ck := &keys.CK{KV: opts.DB.Base} - kv, _ := db.Get(ck.Encode()) + kv, err := db.Get(ck.Encode()) + if err != nil { + return err + } if kv.Exists() == false { err = db.Put(ck.Encode(), []byte("±"))