mirror of
https://github.com/moby/moby.git
synced 2026-08-04 23:21:00 +00:00
container: viewDB.withTxn: don't wrap errors
The withTxn function takes a custom function to execute; we should not
wrap those errors as the only responsibility of this function is to
execute the given function in a transaction.
This was introduced in 6549a270e9, and
an oversight of me.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -152,7 +152,7 @@ func (db *ViewDB) withTxn(cb func(*memdb.Txn) error) error {
|
||||
err := cb(txn)
|
||||
if err != nil {
|
||||
txn.Abort()
|
||||
return errdefs.System(err)
|
||||
return err
|
||||
}
|
||||
txn.Commit()
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user