Browse Source

hww wizard: better handle UserFacingException in one case

E | gui.qt.installwizard.InstallWizard |
Traceback (most recent call last):
  File "...\electrum\electrum\base_wizard.py", line 340, in on_device
    self.plugin.setup_device(device_info, self, purpose)
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 719, in setup_device
    client.get_xpub("m/44'/0'", 'standard')
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 120, in get_xpub
    reply = self._get_xpub(bip32_path)
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 114, in _get_xpub
    if self.check_device_dialog():
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 223, in check_device_dialog
    self.recover_or_erase_dialog() # Already seeded
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 244, in recover_or_erase_dialog
    if not self.dbb_load_backup():
  File "...\electrum\electrum\plugins\digitalbitbox\digitalbitbox.py", line 340, in dbb_load_backup
    raise UserFacingException(backups['error']['message'])
electrum.util.UserFacingException: Please insert SD card.
hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
c0b170acb7
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 6
      electrum/base_wizard.py

6
electrum/base_wizard.py

@ -40,7 +40,7 @@ from .wallet import (Imported_Wallet, Standard_Wallet, Multisig_Wallet,
from .storage import WalletStorage, StorageEncryptionVersion
from .wallet_db import WalletDB
from .i18n import _
from .util import UserCancelled, InvalidPassword, WalletFileException
from .util import UserCancelled, InvalidPassword, WalletFileException, UserFacingException
from .simple_config import SimpleConfig
from .plugin import Plugins, HardwarePluginLibraryUnavailable
from .logging import Logger
@ -356,6 +356,10 @@ class BaseWizard(Logger):
except (UserCancelled, GoBack):
self.choose_hw_device(purpose, storage=storage)
return
except UserFacingException as e:
self.show_error(str(e))
self.choose_hw_device(purpose, storage=storage)
return
except BaseException as e:
self.logger.exception('')
self.show_error(str(e))

Loading…
Cancel
Save