1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

trezor.wire: less logs

This commit is contained in:
Jan Pochyla 2017-06-12 18:05:06 +02:00
parent e94d8cc277
commit 6e15b37205

View File

@ -154,8 +154,8 @@ def _handle_unexpected(session_id, msg_type, data_len):
def _write_report(report): def _write_report(report):
if __debug__: # if __debug__:
log.info(__name__, 'write report %s', ubinascii.hexlify(report)) # log.debug(__name__, 'write report %s', ubinascii.hexlify(report))
msg.send(_interface, report) msg.send(_interface, report)
@ -163,8 +163,8 @@ def _dispatch_reports():
while True: while True:
report, = yield loop.Select(_interface) report, = yield loop.Select(_interface)
report = memoryview(report) report = memoryview(report)
if __debug__: # if __debug__:
log.debug(__name__, 'read report %s', ubinascii.hexlify(report)) # log.debug(__name__, 'read report %s', ubinascii.hexlify(report))
sessions.dispatch( sessions.dispatch(
report, _session_open, _session_close, _session_unknown) report, _session_open, _session_close, _session_unknown)
@ -183,4 +183,4 @@ def _session_close(session_id):
def _session_unknown(session_id, report_data): def _session_unknown(session_id, report_data):
pass log.warning(__name__, 'report on unknown session %x', session_id)