getting rid of more BaseExceptions
This commit is contained in:
parent
cdc16acabb
commit
e12699ae75
|
@ -920,10 +920,10 @@ class Wallet:
|
||||||
|
|
||||||
def mktx(self, to_address, amount, label, password, fee=None, change_addr=None, from_addr= None):
|
def mktx(self, to_address, amount, label, password, fee=None, change_addr=None, from_addr= None):
|
||||||
if not self.is_valid(to_address):
|
if not self.is_valid(to_address):
|
||||||
raise BaseException("Invalid address")
|
raise ValueError("Invalid address")
|
||||||
inputs, total, fee = self.choose_tx_inputs( amount, fee, from_addr )
|
inputs, total, fee = self.choose_tx_inputs( amount, fee, from_addr )
|
||||||
if not inputs:
|
if not inputs:
|
||||||
raise BaseException("Not enough funds")
|
raise ValueError("Not enough funds")
|
||||||
|
|
||||||
if not self.use_change and not change_addr:
|
if not self.use_change and not change_addr:
|
||||||
change_addr = inputs[0][0]
|
change_addr = inputs[0][0]
|
||||||
|
|
Loading…
Reference in New Issue