1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

core/log: be less noisy with ui.Cancelled exceptions

This commit is contained in:
Jan Pochyla 2019-08-22 17:37:31 +02:00
parent 7789a29d50
commit 29153f0e51

View File

@ -62,6 +62,8 @@ def exception(name: str, exc: BaseException) -> None:
# we are using `__class__.__name__` to avoid importing ui module
if exc.__class__.__name__ == "Result":
_log(name, DEBUG, "ui.Result: %s", exc.value)
elif exc.__class__.__name__ == "Cancelled":
_log(name, DEBUG, "ui.Cancelled")
else:
_log(name, ERROR, "exception:")
sys.print_exception(exc)