Don't give an error when reading normal 3MF files

We have a signalling return value for this case. Let's use it.

Contributes to issue CURA-4810.
This commit is contained in:
Ghostkeeper 2018-01-16 10:32:37 +01:00
parent 24eff5f8b8
commit 063eb8e5cd
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -168,11 +168,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
Logger.log("w", "Unknown definition container type %s for %s",
definition_container_type, each_definition_container_file)
Job.yieldThread()
# sanity check
if machine_definition_container_count != 1:
msg = "Expecting one machine definition container but got %s" % machine_definition_container_count
Logger.log("e", msg)
raise RuntimeError(msg)
return WorkspaceReader.PreReadResult.failed #Not a workspace file but ordinary 3MF.
material_labels = []
material_conflict = False