mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Be robust against older specification version numbers
1.2 and lower didn't specify a version number. Assume that it was 1.2. We feed this through our translation function for form, mostly, because we know that the setting_version should be 0 then. Contributes to issue CURA-3427.
This commit is contained in:
parent
365f7cad4c
commit
2365267f35
1 changed files with 4 additions and 1 deletions
|
@ -423,7 +423,10 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
inherited = self._resolveInheritance(inherits.text)
|
||||
data = self._mergeXML(inherited, data)
|
||||
|
||||
if "version" in data.attrib:
|
||||
meta_data["setting_version"] = self.xmlVersionToSettingVersion(data.attrib["version"])
|
||||
else:
|
||||
meta_data["setting_version"] = self.xmlVersionToSettingVersion("1.2") #1.2 and lower didn't have that version number there yet.
|
||||
metadata = data.iterfind("./um:metadata/*", self.__namespaces)
|
||||
for entry in metadata:
|
||||
tag_name = _tag_without_namespace(entry)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue