From 1e60dd11df96b53ca2ee02b653191ee7aab88340 Mon Sep 17 00:00:00 2001 From: croneter Date: Tue, 24 Sep 2019 08:16:04 +0200 Subject: [PATCH] Fix rare AttributeError on PKC startup when modifying advancedsettings.xml --- resources/lib/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 772441db..e9496463 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -938,8 +938,9 @@ class XmlKodiSetting(object): if not append: old = self.get_setting(node_list) if (old is not None and - old.text.strip() == value and - old.attrib == attrib): + ((old.text is not None and old.text.strip() == value) or + (old.text is None and value == '')) and + (old.attrib or {}) == attrib): # Already set exactly these values return old LOG.debug('Adding etree to: %s, value: %s, attrib: %s, append: %s',