Trustedcoin: call wizard.terminate with aborted set to True in various failure conditions (see #4496)
This commit is contained in:
@@ -75,7 +75,7 @@ class Plugin(TrustedCoinPlugin):
|
|||||||
def accept_terms_of_use(self, wizard):
|
def accept_terms_of_use(self, wizard):
|
||||||
def handle_error(msg, e):
|
def handle_error(msg, e):
|
||||||
wizard.show_error(msg + ':\n' + repr(e))
|
wizard.show_error(msg + ':\n' + repr(e))
|
||||||
wizard.terminate()
|
wizard.terminate(aborted=True)
|
||||||
try:
|
try:
|
||||||
tos = server.get_terms_of_service()
|
tos = server.get_terms_of_service()
|
||||||
except ErrorConnectingServer as e:
|
except ErrorConnectingServer as e:
|
||||||
|
|||||||
@@ -671,7 +671,7 @@ class TrustedCoinPlugin(BasePlugin):
|
|||||||
r = server.create(xpub1, xpub2, email)
|
r = server.create(xpub1, xpub2, email)
|
||||||
except (socket.error, ErrorConnectingServer):
|
except (socket.error, ErrorConnectingServer):
|
||||||
wizard.show_message('Server not reachable, aborting')
|
wizard.show_message('Server not reachable, aborting')
|
||||||
wizard.terminate()
|
wizard.terminate(aborted=True)
|
||||||
return
|
return
|
||||||
except TrustedCoinException as e:
|
except TrustedCoinException as e:
|
||||||
if e.status_code == 409:
|
if e.status_code == 409:
|
||||||
@@ -721,10 +721,10 @@ class TrustedCoinPlugin(BasePlugin):
|
|||||||
self.request_otp_dialog(wizard, short_id, None, xpub3)
|
self.request_otp_dialog(wizard, short_id, None, xpub3)
|
||||||
else:
|
else:
|
||||||
wizard.show_message(str(e))
|
wizard.show_message(str(e))
|
||||||
wizard.terminate()
|
wizard.terminate(aborted=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
wizard.show_message(repr(e))
|
wizard.show_message(repr(e))
|
||||||
wizard.terminate()
|
wizard.terminate(aborted=True)
|
||||||
else:
|
else:
|
||||||
k3 = keystore.from_xpub(xpub3)
|
k3 = keystore.from_xpub(xpub3)
|
||||||
wizard.data['x3/'] = k3.dump()
|
wizard.data['x3/'] = k3.dump()
|
||||||
|
|||||||
Reference in New Issue
Block a user