replaced generic exception

This commit is contained in:
Rodolphe Marques 2016-04-26 14:50:04 +02:00
parent 2137203366
commit 665fea7107

View File

@ -204,7 +204,7 @@ class Bigchain(object):
transactions = list(response) transactions = list(response)
if transactions: if transactions:
if len(transactions) != 1: if len(transactions) != 1:
raise Exception('`{}` was spent more then once. There is a problem with the chain'.format( raise exceptions.DoubleSpend('`{}` was spent more then once. There is a problem with the chain'.format(
tx_input['txid'])) tx_input['txid']))
else: else:
return transactions[0] return transactions[0]