diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-07-24 11:32:56 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-07-24 11:33:10 -0400 |
commit | dcf8fddddfa98f39549b57c89c5f79275b0c6b1c (patch) | |
tree | c46152862cb1cf0666c7bd531e0f008829cf04ea /src/lib/Bcfg2/Server/Lint/Duplicates.py | |
parent | 73ac82182e4cdf2d6371f24455ff7bda71afae81 (diff) | |
download | bcfg2-dcf8fddddfa98f39549b57c89c5f79275b0c6b1c.tar.gz bcfg2-dcf8fddddfa98f39549b57c89c5f79275b0c6b1c.tar.bz2 bcfg2-dcf8fddddfa98f39549b57c89c5f79275b0c6b1c.zip |
allow xinclude files to be missing if xi:fallback is provided
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/Duplicates.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Lint/Duplicates.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/Duplicates.py b/src/lib/Bcfg2/Server/Lint/Duplicates.py index ee6b7a2e6..60a02ffb9 100644 --- a/src/lib/Bcfg2/Server/Lint/Duplicates.py +++ b/src/lib/Bcfg2/Server/Lint/Duplicates.py @@ -1,6 +1,7 @@ -import os.path +import os import lxml.etree import Bcfg2.Server.Lint +from Bcfg2.Server import XI, XI_NAMESPACE class Duplicates(Bcfg2.Server.Lint.ServerPlugin): """ Find duplicate clients, groups, etc. """ @@ -80,7 +81,7 @@ class Duplicates(Bcfg2.Server.Lint.ServerPlugin): path = os.path.join(self.metadata.data, mfile) if path in self.files: xdata = lxml.etree.parse(path) - for el in xdata.findall('./{http://www.w3.org/2001/XInclude}include'): + for el in xdata.findall('./%sinclude' % XI_NAMESPACE): if not self.has_all_xincludes(el.get('href')): self.LintError("broken-xinclude-chain", "Broken XInclude chain: could not include %s" % path) |