mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-23 21:02:23 +00:00
chore(core): add logging, update comments
[no changelog]
This commit is contained in:
parent
c8c999919a
commit
b3aacf1485
@ -91,6 +91,10 @@ if utils.USE_THP:
|
|||||||
# This is not done for the debug session because the snapshot taken
|
# 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
|
# in a debug session would clear modules which are in use by the
|
||||||
# workflow running on wire.
|
# workflow running on wire.
|
||||||
|
if __debug__:
|
||||||
|
log.debug(
|
||||||
|
__name__, "utils.unimport_end(modules) and loop.clear()"
|
||||||
|
)
|
||||||
utils.unimport_end(modules)
|
utils.unimport_end(modules)
|
||||||
loop.clear()
|
loop.clear()
|
||||||
return
|
return
|
||||||
@ -154,6 +158,8 @@ async def handle_session(iface: WireInterface, is_debug_session: bool = False) -
|
|||||||
|
|
||||||
if not do_not_restart:
|
if not do_not_restart:
|
||||||
# Let the session be restarted from `main`.
|
# Let the session be restarted from `main`.
|
||||||
|
if __debug__:
|
||||||
|
log.debug(__name__, "loop.clear()")
|
||||||
loop.clear()
|
loop.clear()
|
||||||
return # pylint: disable=lost-exception
|
return # pylint: disable=lost-exception
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ class PairingContext(Context):
|
|||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
# Log and try again. The session handler can only exit explicitly via
|
# Log and try again. The session handler can only exit explicitly via
|
||||||
# loop.clear() above.
|
# loop.clear() above. # TODO not updated comments
|
||||||
if __debug__:
|
if __debug__:
|
||||||
log.exception(__name__, exc)
|
log.exception(__name__, exc)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user