From 2ee0f7028ceee59c36aa27bf41e05ca9d628afde Mon Sep 17 00:00:00 2001 From: matejcik Date: Wed, 12 Feb 2025 10:17:28 +0100 Subject: [PATCH] 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" --- core/src/trezor/ui/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/trezor/ui/__init__.py b/core/src/trezor/ui/__init__.py index 3cd5ffe6e4..9691402d61 100644 --- a/core/src/trezor/ui/__init__.py +++ b/core/src/trezor/ui/__init__.py @@ -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)