mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 03:18:09 +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
98dde40729
commit
1fc7d41b8d
@ -214,6 +214,7 @@ async def handle_session(iface: WireInterface, session_id: int) -> None:
|
|||||||
msg = next_msg
|
msg = next_msg
|
||||||
next_msg = None
|
next_msg = None
|
||||||
|
|
||||||
|
do_not_restart = False
|
||||||
try:
|
try:
|
||||||
do_not_restart = await _handle_single_message(ctx, msg)
|
do_not_restart = await _handle_single_message(ctx, msg)
|
||||||
except context.UnexpectedMessage as unexpected:
|
except context.UnexpectedMessage as unexpected:
|
||||||
|
Loading…
Reference in New Issue
Block a user