fixup! feat(python): use dbus-next for BLE

tychovrahe/T3W1/devkit1_with_ble2
Martin Milata 1 year ago committed by tychovrahe
parent 4a3e763a1b
commit 3bc038c3ee

@ -21,7 +21,7 @@ from typing import TYPE_CHECKING, Any, Callable, Dict, Optional
import click
from .. import exceptions, transport
from .. import exceptions, messages, transport
from ..client import TrezorClient
from ..ui import ClickUI, ScriptUI
@ -104,6 +104,12 @@ class TrezorConnection:
except transport.DeviceIsBusy:
click.echo("Device is in use by another process.")
sys.exit(1)
except exceptions.TrezorFailure as e:
if e.code is messages.FailureType.DeviceIsBusy:
click.echo(str(e))
sys.exit(1)
else:
raise e
except Exception:
click.echo("Failed to find a Trezor device.")
if self.path is not None:

Loading…
Cancel
Save