From 04030cb98ecb895aea2bb00d558081e4e37a78aa Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Thu, 19 Dec 2024 16:03:50 +0100 Subject: [PATCH] chore(core): make wipe device proceed even if sending of success message fails [no changelog] --- core/src/apps/management/wipe_device.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/apps/management/wipe_device.py b/core/src/apps/management/wipe_device.py index bdc076c4de..bdfeadb224 100644 --- a/core/src/apps/management/wipe_device.py +++ b/core/src/apps/management/wipe_device.py @@ -48,8 +48,12 @@ async def wipe_device(msg: WipeDevice) -> NoReturn: # erase translations translations.deinit() translations.erase() - - await get_context().write(Success(message="Device wiped")) + try: + await get_context().write(Success(message="Device wiped")) + except Exception: + if __debug__: + log.debug(__name__, "Failed to send Success message after wipe.") + pass storage.wipe_cache() # reload settings