1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

trezor.wire: fix unexpected message error

This commit is contained in:
Jan Pochyla 2017-01-24 14:13:37 +01:00
parent 943d77ba32
commit e86924d645

View File

@ -148,8 +148,9 @@ def _handle_unexpected(session_id, msg_type, data_len):
from trezor.messages.Failure import Failure
from trezor.messages.FailureType import UnexpectedMessage
failure = Failure(code=UnexpectedMessage, message='Unexpected message')
failure = Failure.dumps(failure)
sessions.get_codec(session_id).encode(
session_id, failure.MESSAGE_WIRE_TYPE, failure.dumps(), _write_report)
session_id, Failure.MESSAGE_WIRE_TYPE, failure, _write_report)
def _write_report(report):