summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Lint/Bundles.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2011-05-05 08:16:51 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2011-05-05 08:16:51 -0400
commit23ae3d201af82292ad4e939569a50f2e32c689a3 (patch)
tree96c1f029b0a5541c63a97a42bd9006c73c532038 /src/lib/Server/Lint/Bundles.py
parent9d68095482ffe50fd0f86ab6119fc55064dcb56f (diff)
downloadbcfg2-23ae3d201af82292ad4e939569a50f2e32c689a3.tar.gz
bcfg2-23ae3d201af82292ad4e939569a50f2e32c689a3.tar.bz2
bcfg2-23ae3d201af82292ad4e939569a50f2e32c689a3.zip
made bcfg2-lint error handling configurable on a much more granular level
Diffstat (limited to 'src/lib/Server/Lint/Bundles.py')
-rw-r--r--src/lib/Server/Lint/Bundles.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/Server/Lint/Bundles.py b/src/lib/Server/Lint/Bundles.py
index 417f76c2d..e90159f7c 100644
--- a/src/lib/Server/Lint/Bundles.py
+++ b/src/lib/Server/Lint/Bundles.py
@@ -33,7 +33,8 @@ class Bundles(Bcfg2.Server.Lint.ServerPlugin):
genshibundle = "%s.genshi" % bundle
if (xmlbundle not in allbundles and
genshibundle not in allbundles):
- self.LintError("Bundle %s referenced, but does not exist" %
+ self.LintError("bundle-not-found",
+ "Bundle %s referenced, but does not exist" %
bundle)
def bundle_names(self, bundle):
@@ -47,8 +48,9 @@ class Bundles(Bcfg2.Server.Lint.ServerPlugin):
fname = bundle.name.split('Bundler/')[1].split('.')[0]
bname = xdata.get('name')
if fname != bname:
- self.LintWarning("Inconsistent bundle name: filename is %s, bundle name is %s" %
- (fname, bname))
+ self.LintError("inconsistent-bundle-name",
+ "Inconsistent bundle name: filename is %s, bundle name is %s" %
+ (fname, bname))
def sgenshi_groups(self, bundle):
""" ensure that Genshi Bundles do not include <Group> tags,
@@ -57,5 +59,6 @@ class Bundles(Bcfg2.Server.Lint.ServerPlugin):
groups = [self.RenderXML(g)
for g in xdata.getroottree().findall("//Group")]
if groups:
- self.LintWarning("<Group> tag is not allowed in SGenshi Bundle:\n%s" %
- "\n".join(groups))
+ self.LintError("group-tag-not-allowed",
+ "<Group> tag is not allowed in SGenshi Bundle:\n%s" %
+ "\n".join(groups))