From 0eeded79301f7aba0389ef4f681b609b55329126 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 5 Oct 2017 13:13:00 +0200 Subject: [PATCH] Fix KeyError in WorkspaceDialog CURA-4404 --- plugins/3MFReader/WorkspaceDialog.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.py b/plugins/3MFReader/WorkspaceDialog.py index fc46a3daec..6acccbb1bc 100644 --- a/plugins/3MFReader/WorkspaceDialog.py +++ b/plugins/3MFReader/WorkspaceDialog.py @@ -239,8 +239,9 @@ class WorkspaceDialog(QObject): # If the machine needs to be re-created, the definition_changes should also be re-created. # If the machine strategy is None, it means that there is no name conflict with existing ones. In this case # new definitions changes are created - if "machine" in self._result and self._result["machine"] == "new" or self._result["machine"] is None and self._result["definition_changes"] is None: - self._result["definition_changes"] = "new" + if "machine" in self._result: + if self._result["machine"] == "new" or self._result["machine"] is None and self._result["definition_changes"] is None: + self._result["definition_changes"] = "new" return self._result