From d4c5b4fabfafa82f3166114da1b46774876fe748 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 5a08bf1b18..e6f787b2c7 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_force(Success(message="Device wiped")) + try: + await get_context().write_force(Success(message="Device wiped")) + except Exception: + if __debug__: + log.debug(__name__, "Failed to send Success message after wipe.") + pass storage.wipe_cache() # reload settings