|
@ -38,9 +38,13 @@ from .util import UserCancelled, InvalidPassword |
|
|
# hardware device setup purpose |
|
|
# hardware device setup purpose |
|
|
HWD_SETUP_NEW_WALLET, HWD_SETUP_DECRYPT_WALLET = range(0, 2) |
|
|
HWD_SETUP_NEW_WALLET, HWD_SETUP_DECRYPT_WALLET = range(0, 2) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ScriptTypeNotSupported(Exception): pass |
|
|
class ScriptTypeNotSupported(Exception): pass |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GoBack(Exception): pass |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BaseWizard(object): |
|
|
class BaseWizard(object): |
|
|
|
|
|
|
|
|
def __init__(self, config, storage): |
|
|
def __init__(self, config, storage): |
|
@ -255,10 +259,11 @@ class BaseWizard(object): |
|
|
devmgr.unpair_id(device_info.device.id_) |
|
|
devmgr.unpair_id(device_info.device.id_) |
|
|
self.choose_hw_device(purpose) |
|
|
self.choose_hw_device(purpose) |
|
|
return |
|
|
return |
|
|
except UserCancelled: |
|
|
except (UserCancelled, GoBack): |
|
|
self.choose_hw_device(purpose) |
|
|
self.choose_hw_device(purpose) |
|
|
return |
|
|
return |
|
|
except BaseException as e: |
|
|
except BaseException as e: |
|
|
|
|
|
traceback.print_exc(file=sys.stderr) |
|
|
self.show_error(str(e)) |
|
|
self.show_error(str(e)) |
|
|
self.choose_hw_device(purpose) |
|
|
self.choose_hw_device(purpose) |
|
|
return |
|
|
return |
|
|