summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrent s <r00t@square-r00t.net>2019-06-03 16:30:32 -0400
committerbrent s <r00t@square-r00t.net>2019-06-03 16:30:32 -0400
commiteb9bbd8b3b0f57e132ccbe0d3c6f30b59a41606e (patch)
tree59226190537f3d8fc9d3dfbd3095b38161eb90e6
parent76c898588fdd9621bd5622a6ce8588cf88bd7595 (diff)
downloadOpTools-eb9bbd8b3b0f57e132ccbe0d3c6f30b59a41606e.tar.xz
add XInclude support
-rwxr-xr-xstorage/backups/borg/backup.py4
1 files changed, 3 insertions, 1 deletions
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. '