Detect problems with connecting to data stores

This commit is contained in:
Tobie Morgan Hitchcock 2016-07-19 10:24:55 +01:00
parent f26c4862a5
commit 14b14b8f21

View file

@ -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("±"))