1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-22 12:32:02 +00:00

chore(core): add logging, update comments

[no changelog]
This commit is contained in:
M1nd3r 2024-08-26 14:23:54 +02:00
parent c8c999919a
commit b3aacf1485
2 changed files with 7 additions and 1 deletions

View File

@ -91,6 +91,10 @@ if utils.USE_THP:
# This is not done for the debug session because the snapshot taken
# in a debug session would clear modules which are in use by the
# workflow running on wire.
if __debug__:
log.debug(
__name__, "utils.unimport_end(modules) and loop.clear()"
)
utils.unimport_end(modules)
loop.clear()
return
@ -154,6 +158,8 @@ async def handle_session(iface: WireInterface, is_debug_session: bool = False) -
if not do_not_restart:
# Let the session be restarted from `main`.
if __debug__:
log.debug(__name__, "loop.clear()")
loop.clear()
return # pylint: disable=lost-exception

View File

@ -134,7 +134,7 @@ class PairingContext(Context):
except Exception as exc:
# Log and try again. The session handler can only exit explicitly via
# loop.clear() above.
# loop.clear() above. # TODO not updated comments
if __debug__:
log.exception(__name__, exc)