DBKeyStore.Load returns no error if keyring not found in db

This commit is contained in:
zelig 2014-06-29 20:53:26 +01:00
parent 2920795168
commit 12972b4b65

View File

@ -32,7 +32,7 @@ func (k *DBKeyStore) Save(session string, keyRing *KeyRing) error {
func (k *DBKeyStore) Load(session string) (*KeyRing, error) { func (k *DBKeyStore) Load(session string) (*KeyRing, error) {
data, err := k.db.Get(k.dbKey(session)) data, err := k.db.Get(k.dbKey(session))
if err != nil { if err != nil {
return nil, err return nil, nil
} }
var keyRing *KeyRing var keyRing *KeyRing
keyRing, err = NewKeyRingFromBytes(data) keyRing, err = NewKeyRingFromBytes(data)