wizard: move GoBack from Qt wizard to base_wizard
This commit is contained in:
@@ -38,9 +38,13 @@ from .util import UserCancelled, InvalidPassword
|
||||
# hardware device setup purpose
|
||||
HWD_SETUP_NEW_WALLET, HWD_SETUP_DECRYPT_WALLET = range(0, 2)
|
||||
|
||||
|
||||
class ScriptTypeNotSupported(Exception): pass
|
||||
|
||||
|
||||
class GoBack(Exception): pass
|
||||
|
||||
|
||||
class BaseWizard(object):
|
||||
|
||||
def __init__(self, config, storage):
|
||||
@@ -255,10 +259,11 @@ class BaseWizard(object):
|
||||
devmgr.unpair_id(device_info.device.id_)
|
||||
self.choose_hw_device(purpose)
|
||||
return
|
||||
except UserCancelled:
|
||||
except (UserCancelled, GoBack):
|
||||
self.choose_hw_device(purpose)
|
||||
return
|
||||
except BaseException as e:
|
||||
traceback.print_exc(file=sys.stderr)
|
||||
self.show_error(str(e))
|
||||
self.choose_hw_device(purpose)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user