mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-17 10:51:00 +00:00
fix(python/trezorctl): re-enable trezorctl -p udp
[no changelog]
This commit is contained in:
parent
07addae05f
commit
fa7c818cfc
@ -69,6 +69,9 @@ class UdpTransport(ProtocolBasedTransport):
|
||||
raise TransportException(
|
||||
f"No Trezor device found at address {d.get_path()}"
|
||||
)
|
||||
except Exception as e:
|
||||
raise TransportException(f"Error opening {d.get_path()}") from e
|
||||
|
||||
finally:
|
||||
d.close()
|
||||
|
||||
@ -85,8 +88,8 @@ class UdpTransport(ProtocolBasedTransport):
|
||||
@classmethod
|
||||
def find_by_path(cls, path: str, prefix_search: bool = False) -> "UdpTransport":
|
||||
try:
|
||||
path = path.replace(f"{cls.PATH_PREFIX}:", "")
|
||||
return cls._try_path(path)
|
||||
address = path.replace(f"{cls.PATH_PREFIX}:", "")
|
||||
return cls._try_path(address)
|
||||
except TransportException:
|
||||
if not prefix_search:
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user