Fix errors when PKC tries to edit files but they don't exist yet
This commit is contained in:
parent
6040e40a7a
commit
953b8383bb
1 changed files with 1 additions and 2 deletions
|
@ -697,8 +697,7 @@ class XmlKodiSetting(object):
|
||||||
# Document is blank or missing
|
# Document is blank or missing
|
||||||
if self.force_create is False:
|
if self.force_create is False:
|
||||||
LOG.debug('%s does not seem to exist; not creating', self.path)
|
LOG.debug('%s does not seem to exist; not creating', self.path)
|
||||||
# This will abort __enter__
|
raise
|
||||||
self.__exit__(IOError('File not found'), None, None)
|
|
||||||
# Create topmost xml entry
|
# Create topmost xml entry
|
||||||
self.tree = etree.ElementTree(etree.Element(self.top_element))
|
self.tree = etree.ElementTree(etree.Element(self.top_element))
|
||||||
self.write_xml = True
|
self.write_xml = True
|
||||||
|
|
Loading…
Reference in a new issue