Browse Source

trezor: raise and catch BaseException in signing

master
ThomasV 11 years ago
parent
commit
956f69f3d3
  1. 2
      gui/qt/util.py
  2. 4
      plugins/btchipwallet.py
  3. 4
      plugins/trezor.py

2
gui/qt/util.py

@ -35,7 +35,7 @@ class WaitingDialog(QThread):
self.error = None
try:
self.result = self.run_task()
except Exception as e:
except BaseException as e:
traceback.print_exc(file=sys.stdout)
self.error = str(e)
self.d.emit(SIGNAL('done'))

4
plugins/btchipwallet.py

@ -322,8 +322,10 @@ class BTChipWallet(NewWallet):
return b64encode(chr(27 + 4 + (signature[0] & 0x01)) + r + s)
def sign_transaction(self, tx, keypairs, password):
if tx.error or tx.is_complete():
if tx.is_complete():
return
if tx.error:
raise BaseException(tx.error)
self.signing = True
inputs = []
inputsPaths = []

4
plugins/trezor.py

@ -274,8 +274,10 @@ class TrezorWallet(NewWallet):
return str(b64_msg_sig)
def sign_transaction(self, tx, keypairs, password):
if tx.error or tx.is_complete():
if tx.is_complete():
return
if tx.error:
raise BaseException(tx.error)
if not self.check_proper_device():
give_error('Wrong device or password')

Loading…
Cancel
Save