Merge pull request #300 from kaykurokawa/fix_claim_defer

Missing the return of a defer.fail when claim fails, changing to raise Exception
This commit is contained in:
Umpei Kay Kurokawa 2016-11-30 23:08:48 -05:00 committed by GitHub
commit 67b169c5a1

View file

@ -480,7 +480,7 @@ class Wallet(object):
def _save_metadata(claim_out, metadata): def _save_metadata(claim_out, metadata):
if not claim_out['success']: if not claim_out['success']:
msg = 'Claim to name {} failed: {}'.format(name, claim_out['reason']) msg = 'Claim to name {} failed: {}'.format(name, claim_out['reason'])
defer.fail(Exception(msg)) raise Exception(msg)
claim_outpoint = ClaimOutpoint(claim_out['txid'], claim_out['nout']) claim_outpoint = ClaimOutpoint(claim_out['txid'], claim_out['nout'])
log.debug("Saving metadata for claim %s %d" % (claim_outpoint['txid'], claim_outpoint['nout'])) log.debug("Saving metadata for claim %s %d" % (claim_outpoint['txid'], claim_outpoint['nout']))
d = self._save_name_metadata(name, claim_outpoint, metadata['sources']['lbry_sd_hash']) d = self._save_name_metadata(name, claim_outpoint, metadata['sources']['lbry_sd_hash'])