From 7be67f43f84053f94f953bec3fe13aade2405de1 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Mon, 8 Feb 2021 11:59:32 +0100 Subject: [PATCH] Let the FileNotFound error be handled later in the read file process An error will pop up by the ReadFileJob if the file cannot be found. If we also handle the File NotFound error in the checkIsValidProjectFile, then two error message will pop up in the user's screen, which is not desired. So, let only the ReadFileJob show it's error instead. CURA-7996 --- cura/CuraApplication.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 766d49fcea..e3465e6af5 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1941,14 +1941,7 @@ class CuraApplication(QtApplication): try: result = workspace_reader.preRead(file_path, show_dialog=False) return result == WorkspaceReader.PreReadResult.accepted - except FileNotFoundError: - result_message = Message(text = self._i18n_catalog.i18nc("@info:status Don't translate the XML tag !", - "Failed to load {0}. File is moved or deleted.", - file_path), lifetime = 0, - title = self._i18n_catalog.i18nc("@info:title", "Unable to Open File")) - result_message.show() - return False - except Exception: + except: Logger.logException("e", "Could not check file %s", file_url) return False