From 74f6ac27af74b5e2a81bd98e3f883a946720fdef Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 30 Nov 2018 20:45:54 +0100 Subject: [PATCH] wizard/hw: cap transport string follow-up 32af83b7aede02f0b9bb3e8294ef2dc0481fb6de --- electrum/base_wizard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electrum/base_wizard.py b/electrum/base_wizard.py index 84323226c..4f3909794 100644 --- a/electrum/base_wizard.py +++ b/electrum/base_wizard.py @@ -283,7 +283,9 @@ class BaseWizard(object): for name, info in devices: state = _("initialized") if info.initialized else _("wiped") label = info.label or _("An unnamed {}").format(name) - descr = f"{label} [{name}, {state}, {info.device.transport_ui_string}]" + try: transport_str = info.device.transport_ui_string[:20] + except: transport_str = 'unknown transport' + descr = f"{label} [{name}, {state}, {transport_str}]" choices.append(((name, info), descr)) msg = _('Select a device') + ':' self.choice_dialog(title=title, message=msg, choices=choices, run_next= lambda *args: self.on_device(*args, purpose=purpose))