mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-24 03:55:44 +00:00
fix(core): update exception name in layout shutdown reporting
also return after the exception branch, so that the "value" is not reported twice, once as an exception and a second time as a "non-none return"
This commit is contained in:
parent
bd342b3ab7
commit
2ee0f7028c
@ -443,7 +443,7 @@ class Layout(Generic[T]):
|
||||
return
|
||||
|
||||
if isinstance(value, BaseException):
|
||||
if __debug__ and value.__class__.__name__ != "UnexpectedMessage":
|
||||
if __debug__ and value.__class__.__name__ != "UnexpectedMessageException":
|
||||
log.error(
|
||||
__name__, "UI task died: %s (%s)", task, value.__class__.__name__
|
||||
)
|
||||
@ -451,6 +451,7 @@ class Layout(Generic[T]):
|
||||
self._emit_message(value)
|
||||
except Shutdown:
|
||||
pass
|
||||
return
|
||||
|
||||
if __debug__:
|
||||
log.error(__name__, "UI task returned non-None: %s (%s)", task, value)
|
||||
|
Loading…
Reference in New Issue
Block a user