summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-05-11 10:12:45 -0400
committerSol Jerome <sol.jerome@gmail.com>2011-06-14 12:36:45 -0500
commit564a0ae955286194094ea5e6eda0afb7f755ca91 (patch)
tree99a790ccdeb7cbe8ab12064dce84f003b9781244
parentfa70c550a90c369ac48862d976e3d4294181be89 (diff)
downloadbcfg2-564a0ae955286194094ea5e6eda0afb7f755ca91.tar.gz
bcfg2-564a0ae955286194094ea5e6eda0afb7f755ca91.tar.bz2
bcfg2-564a0ae955286194094ea5e6eda0afb7f755ca91.zip
Fixed error messages from info.xml bcfg2-lint check
-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)))