1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #363 from aboch/nf

Fix incorrect error handling in bitseq constructor
This commit is contained in:
Jana Radhakrishnan 2015-07-05 22:16:54 -07:00
commit 0128339836

View file

@ -55,12 +55,11 @@ func NewHandle(app string, ds datastore.DataStore, id string, numElements uint32
h.watchForChanges() h.watchForChanges()
// Get the initial status from the ds if present. // Get the initial status from the ds if present.
err := h.store.GetObject(datastore.Key(h.Key()...), h) if err := h.store.GetObject(datastore.Key(h.Key()...), h); err != nil && err != datastore.ErrKeyNotFound {
if err != datastore.ErrKeyNotFound {
return nil, err return nil, err
} }
return h, err return h, nil
} }
// Sequence reresents a recurring sequence of 32 bits long bitmasks // Sequence reresents a recurring sequence of 32 bits long bitmasks