1
0

wizard: move GoBack from Qt wizard to base_wizard

This commit is contained in:
SomberNight
2018-05-01 14:39:01 +02:00
parent ba7d905dfb
commit ae24af9bc2
3 changed files with 9 additions and 7 deletions

View File

@@ -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