summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Lint
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Lint')
-rw-r--r--src/lib/Server/Lint/InfoXML.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/Server/Lint/InfoXML.py b/src/lib/Server/Lint/InfoXML.py
index 097c2d6f9..42679109a 100644
--- a/src/lib/Server/Lint/InfoXML.py
+++ b/src/lib/Server/Lint/InfoXML.py
@@ -15,8 +15,8 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
xdata = entryset.infoxml.pnode.data
for info in xdata.getroottree().findall("//Info"):
required = ["owner", "group", "perms"]
- if "required" in self.config:
- required = self.config["required"].split(",")
+ if "required_attrs" in self.config:
+ required = self.config["required_attrs"].split(",")
missing = [attr for attr in required
if info.get(attr) is None]
@@ -27,8 +27,12 @@ class InfoXML(Bcfg2.Server.Lint.ServerPlugin):
if ("require_paranoid" in self.config and
self.config["require_paranoid"].lower() == "true" and
- not Bcfg2.Options.MDATA_PARANOID.value and
- info.get("paranoid").lower() != "true"):
+ (Bcfg2.Options.MDATA_PARANOID.value and
+ info.get("paranoid") is not None and
+ info.get("paranoid").lower() == "false") or
+ (not Bcfg2.Options.MDATA_PARANOID.value and
+ (info.get("paranoid") is None or
+ info.get("paranoid").lower() != "true"))):
self.LintError("Paranoid must be true in %s:%s" %
(infoxml_fname,
self.RenderXML(info)))