summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Lint
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-05-11 10:12:45 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-05-11 10:12:45 -0400
commitfcbd4572ba2aee14b970a128759ce6fce78d8314 (patch)
tree4e8255343991afdb283717a6ef0cf266505b181f /src/lib/Server/Lint
parentf7c83f5614d577c6d65e651ad6fca26c1d7b4253 (diff)
downloadbcfg2-fcbd4572ba2aee14b970a128759ce6fce78d8314.tar.gz
bcfg2-fcbd4572ba2aee14b970a128759ce6fce78d8314.tar.bz2
bcfg2-fcbd4572ba2aee14b970a128759ce6fce78d8314.zip
Fixed error messages from info.xml bcfg2-lint check
Diffstat (limited to 'src/lib/Server/Lint')
-rw-r--r--src/lib/Server/Lint/InfoXML.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/Server/Lint/InfoXML.py b/src/lib/Server/Lint/InfoXML.py
index 7725ad748..c88e54e95 100644
--- a/src/lib/Server/Lint/InfoXML.py
+++ b/src/lib/Server/Lint/InfoXML.py
@@ -13,12 +13,13 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
if self.HandlesFile(infoxml_fname):
if (hasattr(entryset, "infoxml") and
entryset.infoxml is not None):
- self.check_infoxml(entryset.infoxml.pnode.data)
+ self.check_infoxml(infoxml_fname,
+ entryset.infoxml.pnode.data)
else:
self.LintError("no-infoxml",
"No info.xml found for %s" % filename)
- def check_infoxml(self, xdata):
+ def check_infoxml(self, fname, xdata):
for info in xdata.getroottree().findall("//Info"):
required = []
if "required_attrs" in self.config:
@@ -28,8 +29,7 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
if missing:
self.LintError("required-infoxml-attrs-missing",
"Required attribute(s) %s not found in %s:%s" %
- (",".join(missing), infoxml_fname,
- self.RenderXML(info)))
+ (",".join(missing), fname, self.RenderXML(info)))
if ((Bcfg2.Options.MDATA_PARANOID.value and
info.get("paranoid") is not None and
@@ -39,5 +39,5 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
info.get("paranoid").lower() != "true"))):
self.LintError("paranoid-false",
"Paranoid must be true in %s:%s" %
- (infoxml_fname, self.RenderXML(info)))
+ (fname, self.RenderXML(info)))