From dc2786fbc00d3994a7fb08dc198d9e5218678e84 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 28 Nov 2018 17:09:31 -0500 Subject: [PATCH] assert instead of if --- lbrynet/extras/wallet/manager.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lbrynet/extras/wallet/manager.py b/lbrynet/extras/wallet/manager.py index 051c39d18..dc72bf97a 100644 --- a/lbrynet/extras/wallet/manager.py +++ b/lbrynet/extras/wallet/manager.py @@ -334,10 +334,8 @@ class LbryWalletManager(BaseWalletManager): if other_txo.is_claim and other_txo.claim_id == txo.claim_id: previous = other_txo break - if previous is None: - raise ValueError( - "Invalid claim update state, expected to find previous claim in input." - ) + assert previous is not None,\ + "Invalid claim update state, expected to find previous claim in input." item['update_info'].append({ 'address': txo.get_address(account.ledger), 'balance_delta': dewies_to_lbc(previous.amount-txo.amount),