From 32cfd5356964ad1553900c6e8552f8bee874dabc Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Mon, 12 May 2025 14:35:27 +0200 Subject: [PATCH] exceptions also stop after first loop if nothing else enabled --- shared/export.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shared/export.py b/shared/export.py index 303a4d6e..74b0fbcd 100644 --- a/shared/export.py +++ b/shared/export.py @@ -82,18 +82,18 @@ async def export_contents(title, contents, fname_pattern, derive=None, addr_fmt= h = ngu.hash.sha256s(contents.encode()) sig_nice = write_sig_file([(h, fname)], derive, addr_fmt) + msg = '%s file written:\n\n%s' % (title, nice) + if sig: + msg += "\n\n%s signature file written:\n\n%s" % (title, sig_nice) + + await ux_show_story(msg) + except CardMissingError: await needs_microsd() - continue except Exception as e: await ux_show_story('Failed to write!\n\n\n' + str(e)) - continue - msg = '%s file written:\n\n%s' % (title, nice) - if sig: - msg += "\n\n%s signature file written:\n\n%s" % (title, sig_nice) - - await ux_show_story(msg) + # both exceptions & success gets here if no_qr and (NFC is None) and (VD is None) and not force_prompt: # user has no other ways enabled, we already exported to SD - done return