Fix rare AttributeError on PKC startup when modifying advancedsettings.xml

This commit is contained in:
croneter 2019-09-24 08:16:04 +02:00
parent 055fe9aaa7
commit 1e60dd11df

View file

@ -938,8 +938,9 @@ class XmlKodiSetting(object):
if not append: if not append:
old = self.get_setting(node_list) old = self.get_setting(node_list)
if (old is not None and if (old is not None and
old.text.strip() == value and ((old.text is not None and old.text.strip() == value) or
old.attrib == attrib): (old.text is None and value == '')) and
(old.attrib or {}) == attrib):
# Already set exactly these values # Already set exactly these values
return old return old
LOG.debug('Adding etree to: %s, value: %s, attrib: %s, append: %s', LOG.debug('Adding etree to: %s, value: %s, attrib: %s, append: %s',