From 10a5c6864cc210dce978426c338ba5eccaf97d33 Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 22 Feb 2024 12:02:49 +0000 Subject: [PATCH] Add finally statement --- src/Export.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Export.py b/src/Export.py index 7caddb8..6215eca 100644 --- a/src/Export.py +++ b/src/Export.py @@ -48,5 +48,6 @@ def finalise(data: list, path: str, err: int): dialogue = Gtk.MessageDialog(text="Unable to export file", message_type=Gtk.MessageType.INFO, buttons=Gtk.ButtonsType.OK) - dialogue.connect("response", lambda dialog, *args: dialog.destroy()) - dialogue.present() + finally: + dialogue.connect("response", lambda dialog, *args: dialog.destroy()) + dialogue.present()