From 3a921264fc2a16d2b22c94ede2e6cd54b303b346 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 24 Aug 2016 16:10:21 +0200 Subject: [PATCH] Explicitly check label xml element if it's none For some stupid reason, an XML element evaluates to false. CURA-1968 --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 74102a862b..b47190e726 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -241,7 +241,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): color = entry.find("./um:color", self.__namespaces) label = entry.find("./um:label", self.__namespaces) - if label: + if label is not None: self.setName(label.text) else: self.setName(self._profile_name(material.text, color.text))