mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
fix(core): set default value for do_not_restart
otherwise if _handle_single_message raises an exception (which is fortunately not something that should generally happen), the finally-block would fail on "referenced before assignment"
This commit is contained in:
parent
38b1151673
commit
d24ea3ca7d
@ -216,6 +216,7 @@ async def handle_session(iface: WireInterface, session_id: int) -> None:
|
||||
msg = next_msg
|
||||
next_msg = None
|
||||
|
||||
do_not_restart = False
|
||||
try:
|
||||
do_not_restart = await _handle_single_message(ctx, msg)
|
||||
except context.UnexpectedMessage as unexpected:
|
||||
|
Loading…
Reference in New Issue
Block a user