mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-22 10:09:04 +00:00
fix(python): remove transport close from get_protocol
This commit is contained in:
parent
b7b57c5516
commit
2e1085f7bc
@ -187,11 +187,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