diff --git a/qgepqwat2ili/gui/gui_import.py b/qgepqwat2ili/gui/gui_import.py index 499865b8..05ff2e56 100644 --- a/qgepqwat2ili/gui/gui_import.py +++ b/qgepqwat2ili/gui/gui_import.py @@ -246,8 +246,7 @@ def commit_session(self): self.session.commit() except Exception as e: self.rollback_session(e) - iface.messageBar().pushMessage("Error", f"An error occurred: {e}", level=Qgis.Warning) - iface.messageBar().pushMessage("Error", "Import was canceled", level=Qgis.Warning) + finally: self.session.close()