Browse Source

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
Kostas Karmas 4 years ago
parent
commit
7be67f43f8
1 changed files with 1 additions and 8 deletions
  1. 1 8
      cura/CuraApplication.py

+ 1 - 8
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 <filename>!",
-                                                                     "Failed to load <filename>{0}</filename>. 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