mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-12 14:16:06 +00:00
fix(python): remove transport close from get_protocol
This commit is contained in:
parent
50c9c6aa9b
commit
28eaa8552d
@ -218,11 +218,9 @@ class TrezorClient:
|
||||
|
||||
def _get_protocol(self) -> Channel:
|
||||
protocol = ProtocolV1Channel(self.transport, mapping.DEFAULT_MAPPING)
|
||||
|
||||
protocol.write(messages.Initialize())
|
||||
|
||||
response = protocol.read()
|
||||
self.transport.close()
|
||||
|
||||
if isinstance(response, messages.Failure):
|
||||
if response.code == messages.FailureType.InvalidProtocol:
|
||||
LOG.debug("Protocol V2 detected")
|
||||
|
Loading…
Reference in New Issue
Block a user