From 953b8383bbee508646b3e0cf5ab3bc694de5321b Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 25 Jul 2021 15:20:43 +0200 Subject: [PATCH] Fix errors when PKC tries to edit files but they don't exist yet --- resources/lib/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/lib/utils.py b/resources/lib/utils.py index 757900bc..cdf95acf 100644 --- a/resources/lib/utils.py +++ b/resources/lib/utils.py @@ -697,8 +697,7 @@ class XmlKodiSetting(object): # Document is blank or missing if self.force_create is False: LOG.debug('%s does not seem to exist; not creating', self.path) - # This will abort __enter__ - self.__exit__(IOError('File not found'), None, None) + raise # Create topmost xml entry self.tree = etree.ElementTree(etree.Element(self.top_element)) self.write_xml = True