From eb9bbd8b3b0f57e132ccbe0d3c6f30b59a41606e Mon Sep 17 00:00:00 2001 From: brent s Date: Mon, 3 Jun 2019 16:30:32 -0400 Subject: [PATCH] add XInclude support --- storage/backups/borg/backup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/backups/borg/backup.py b/storage/backups/borg/backup.py index be8eb7e..ec90e34 100755 --- a/storage/backups/borg/backup.py +++ b/storage/backups/borg/backup.py @@ -102,7 +102,9 @@ class Backup(object): exit(1) try: 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: self.logger.error('{0} is invalid XML'.format(self.args['cfgfile'])) raise ValueError(('{0} does not seem to be valid XML. '