parent
e45a133f51
commit
6021407929
1 changed files with 2 additions and 2 deletions
|
@ -678,7 +678,7 @@ class XmlKodiSetting(object):
|
||||||
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__
|
# This will abort __enter__
|
||||||
raise IOError
|
self.__exit__(IOError, None, None)
|
||||||
# Create topmost xml entry
|
# Create topmost xml entry
|
||||||
self.tree = etree.ElementTree(
|
self.tree = etree.ElementTree(
|
||||||
element=etree.Element(self.top_element))
|
element=etree.Element(self.top_element))
|
||||||
|
@ -690,7 +690,7 @@ class XmlKodiSetting(object):
|
||||||
messageDialog(lang(29999), lang(39716).format(
|
messageDialog(lang(29999), lang(39716).format(
|
||||||
self.filename,
|
self.filename,
|
||||||
'http://kodi.wiki'))
|
'http://kodi.wiki'))
|
||||||
raise etree.ParseError
|
self.__exit__(etree.ParseError, None, None)
|
||||||
self.root = self.tree.getroot()
|
self.root = self.tree.getroot()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue