From 19fe101d730d3f38d8729a8063fd9168c0f2d63d Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 9 Feb 2017 10:11:46 -0500 Subject: [PATCH] fix claim update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dict.update does not return the dict, so this can’t be lambda’d --- lbrynet/core/Wallet.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lbrynet/core/Wallet.py b/lbrynet/core/Wallet.py index d66616cea..9badf34ce 100644 --- a/lbrynet/core/Wallet.py +++ b/lbrynet/core/Wallet.py @@ -642,6 +642,10 @@ class Wallet(object): d.addCallback(lambda _: claim_out) return d + def _add_claim_id(claim_out, claim): + claim_out.update({'claim_id': claim['claim_id']}) + return claim_out + def _claim_or_update(claim, metadata, _bid): if not claim: log.debug("No own claim yet, making a new one") @@ -658,7 +662,7 @@ class Wallet(object): lambda new_metadata: self._send_name_claim_update(name, claim['claim_id'], claim_outpoint, new_metadata, _bid)) - d.addCallback(lambda claim_out: claim_out.update({'claim_id': claim['claim_id']})) + d.addCallback(_add_claim_id, claim) return d meta = Metadata(m)