add XInclude support
This commit is contained in:
parent
76c898588f
commit
eb9bbd8b3b
@ -102,7 +102,9 @@ class Backup(object):
|
|||||||
exit(1)
|
exit(1)
|
||||||
try:
|
try:
|
||||||
with open(self.args['cfgfile'], 'rb') as f:
|
with open(self.args['cfgfile'], 'rb') as f:
|
||||||
self.cfg = etree.fromstring(f.read())
|
self.xml = etree.parse(f)
|
||||||
|
self.xml.xinclude()
|
||||||
|
self.cfg = self.xml.getroot()
|
||||||
except etree.XMLSyntaxError:
|
except etree.XMLSyntaxError:
|
||||||
self.logger.error('{0} is invalid XML'.format(self.args['cfgfile']))
|
self.logger.error('{0} is invalid XML'.format(self.args['cfgfile']))
|
||||||
raise ValueError(('{0} does not seem to be valid XML. '
|
raise ValueError(('{0} does not seem to be valid XML. '
|
||||||
|
Loading…
Reference in New Issue
Block a user