mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 07:51:27 +00:00
wizard: hww creation flow: don't just swallow exception
if we just return here, the calling code will try to create the storage and fail
This commit is contained in:
parent
4b1d835304
commit
a3e1b2e00c
1 changed files with 4 additions and 2 deletions
|
@ -263,7 +263,7 @@ class BaseWizard(Logger):
|
|||
k = keystore.from_master_key(text)
|
||||
self.on_keystore(k)
|
||||
|
||||
def choose_hw_device(self, purpose=HWD_SETUP_NEW_WALLET, *, storage=None):
|
||||
def choose_hw_device(self, purpose=HWD_SETUP_NEW_WALLET, *, storage: WalletStorage = None):
|
||||
title = _('Hardware Keystore')
|
||||
# check available plugins
|
||||
supported_plugins = self.plugins.get_hardware_support()
|
||||
|
@ -343,7 +343,7 @@ class BaseWizard(Logger):
|
|||
self.choice_dialog(title=title, message=msg, choices=choices,
|
||||
run_next=lambda *args: self.on_device(*args, purpose=purpose, storage=storage))
|
||||
|
||||
def on_device(self, name, device_info: 'DeviceInfo', *, purpose, storage=None):
|
||||
def on_device(self, name, device_info: 'DeviceInfo', *, purpose, storage: WalletStorage = None):
|
||||
self.plugin = self.plugins.get_plugin(name)
|
||||
assert isinstance(self.plugin, HW_PluginBase)
|
||||
devmgr = self.plugins.device_manager
|
||||
|
@ -444,6 +444,7 @@ class BaseWizard(Logger):
|
|||
except BaseException as e:
|
||||
self.logger.exception('')
|
||||
self.show_error(e)
|
||||
self.choose_hw_device()
|
||||
return
|
||||
d = {
|
||||
'type': 'hardware',
|
||||
|
@ -565,6 +566,7 @@ class BaseWizard(Logger):
|
|||
except BaseException as e:
|
||||
self.logger.exception('')
|
||||
self.show_error(str(e))
|
||||
self.choose_hw_device()
|
||||
return
|
||||
self.request_storage_encryption(
|
||||
run_next=lambda encrypt_storage: self.on_password(
|
||||
|
|
Loading…
Add table
Reference in a new issue