diff --git a/plugins/digitalbitbox/digitalbitbox.py b/plugins/digitalbitbox/digitalbitbox.py index 62365b443..f8704a838 100644 --- a/plugins/digitalbitbox/digitalbitbox.py +++ b/plugins/digitalbitbox/digitalbitbox.py @@ -695,6 +695,9 @@ class DigitalBitboxPlugin(HW_PluginBase): devmgr = self.device_manager() device_id = device_info.device.id_ client = devmgr.client_by_id(device_id) + if client is None: + raise Exception(_('Failed to create a client for this device.') + '\n' + + _('Make sure it is in the correct state.')) client.handler = self.create_handler(wizard) if purpose == HWD_SETUP_NEW_WALLET: client.setupRunning = True diff --git a/plugins/keepkey/keepkey.py b/plugins/keepkey/keepkey.py index 56c817668..0355e50a1 100644 --- a/plugins/keepkey/keepkey.py +++ b/plugins/keepkey/keepkey.py @@ -224,6 +224,9 @@ class KeepKeyPlugin(HW_PluginBase): devmgr = self.device_manager() device_id = device_info.device.id_ client = devmgr.client_by_id(device_id) + if client is None: + raise Exception(_('Failed to create a client for this device.') + '\n' + + _('Make sure it is in the correct state.')) # fixme: we should use: client.handler = wizard client.handler = self.create_handler(wizard) if not device_info.initialized: diff --git a/plugins/ledger/ledger.py b/plugins/ledger/ledger.py index 0e963eef5..ab44458f7 100644 --- a/plugins/ledger/ledger.py +++ b/plugins/ledger/ledger.py @@ -585,6 +585,9 @@ class LedgerPlugin(HW_PluginBase): devmgr = self.device_manager() device_id = device_info.device.id_ client = devmgr.client_by_id(device_id) + if client is None: + raise Exception(_('Failed to create a client for this device.') + '\n' + + _('Make sure it is in the correct state.')) client.handler = self.create_handler(wizard) client.get_xpub("m/44'/0'", 'standard') # TODO replace by direct derivation once Nano S > 1.1 diff --git a/plugins/trezor/trezor.py b/plugins/trezor/trezor.py index 3539b9de4..648c85678 100644 --- a/plugins/trezor/trezor.py +++ b/plugins/trezor/trezor.py @@ -257,6 +257,9 @@ class TrezorPlugin(HW_PluginBase): devmgr = self.device_manager() device_id = device_info.device.id_ client = devmgr.client_by_id(device_id) + if client is None: + raise Exception(_('Failed to create a client for this device.') + '\n' + + _('Make sure it is in the correct state.')) # fixme: we should use: client.handler = wizard client.handler = self.create_handler(wizard) if not device_info.initialized: