From 2bfcf9f0b52c0a6f8eab99119ff101a4dff5197c Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 1 Mar 2018 13:41:02 +0100 Subject: [PATCH] Trezor model T does not provide bootloader hash --- plugins/trezor/qt_generic.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/trezor/qt_generic.py b/plugins/trezor/qt_generic.py index 2440daee..808f83a6 100644 --- a/plugins/trezor/qt_generic.py +++ b/plugins/trezor/qt_generic.py @@ -321,8 +321,11 @@ class SettingsDialog(WindowModalDialog): def update(features): self.features = features set_label_enabled() - bl_hash = bh2u(features.bootloader_hash) - bl_hash = "\n".join([bl_hash[:32], bl_hash[32:]]) + if features.bootloader_hash: + bl_hash = bh2u(features.bootloader_hash) + bl_hash = "\n".join([bl_hash[:32], bl_hash[32:]]) + else: + bl_hash = "N/A" noyes = [_("No"), _("Yes")] endis = [_("Enable Passphrases"), _("Disable Passphrases")] disen = [_("Disabled"), _("Enabled")]