mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
chore(trezorlib): remove unnecessary prints
[no changelog]
This commit is contained in:
parent
f6ff8529c6
commit
a68baa6242
@ -146,7 +146,6 @@ class TrezorClient(Generic[UI]):
|
||||
self.session_counter += 1
|
||||
|
||||
def resume_session(self) -> None:
|
||||
print("resume session")
|
||||
new_id = self.transport.resume_session(self.session_id or b"")
|
||||
if self.session_id != new_id:
|
||||
print("Failed to resume session, allocated a new session")
|
||||
@ -163,12 +162,9 @@ class TrezorClient(Generic[UI]):
|
||||
|
||||
def call_raw(self, msg: "MessageType") -> "MessageType":
|
||||
__tracebackhide__ = True # for pytest # pylint: disable=W0612
|
||||
print("self.call_raw-start")
|
||||
|
||||
self._raw_write(msg)
|
||||
print("self.call_raw-after write")
|
||||
x = self._raw_read()
|
||||
print("self.call_raw-end")
|
||||
return x
|
||||
|
||||
def _raw_write(self, msg: "MessageType") -> None:
|
||||
@ -186,7 +182,6 @@ class TrezorClient(Generic[UI]):
|
||||
|
||||
def _raw_read(self) -> "MessageType":
|
||||
__tracebackhide__ = True # for pytest # pylint: disable=W0612
|
||||
print("raw read - start")
|
||||
msg_type, msg_bytes = self.transport.read()
|
||||
print("type/data", msg_type, msg_bytes)
|
||||
LOG.log(
|
||||
@ -272,7 +267,6 @@ class TrezorClient(Generic[UI]):
|
||||
|
||||
@session
|
||||
def call(self, msg: "MessageType") -> "MessageType":
|
||||
print("self.call-start")
|
||||
self.check_firmware_version()
|
||||
resp = self.call_raw(msg)
|
||||
while True:
|
||||
@ -334,7 +328,6 @@ class TrezorClient(Generic[UI]):
|
||||
self._refresh_features(resp)
|
||||
return resp
|
||||
|
||||
# @session
|
||||
def init_device(
|
||||
self,
|
||||
*,
|
||||
|
@ -22,22 +22,16 @@ def write_payload_to_wire_and_add_checksum(
|
||||
chksum: bytes = checksum.compute(header.to_bytes_init() + transport_payload)
|
||||
data = transport_payload + chksum
|
||||
write_payload_to_wire(handle, header, data)
|
||||
print("WOO")
|
||||
|
||||
|
||||
def write_payload_to_wire(
|
||||
handle: Handle, header: PacketHeader, transport_payload: bytes
|
||||
):
|
||||
print("tttt")
|
||||
handle.open()
|
||||
buffer = bytearray(transport_payload)
|
||||
chunk = header.to_bytes_init() + buffer[: PACKET_LENGTH - INIT_HEADER_LENGTH]
|
||||
print("x")
|
||||
chunk = chunk.ljust(PACKET_LENGTH, b"\x00")
|
||||
print("y")
|
||||
print(hexlify(chunk))
|
||||
handle.write_chunk(chunk)
|
||||
print("fgh")
|
||||
|
||||
buffer = buffer[PACKET_LENGTH - INIT_HEADER_LENGTH :]
|
||||
while buffer:
|
||||
|
Loading…
Reference in New Issue
Block a user