summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Lint/Bundles.py6
-rw-r--r--src/lib/Server/Lint/Comments.py2
-rw-r--r--src/lib/Server/Lint/RequiredAttrs.py2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/Server/Lint/Bundles.py b/src/lib/Server/Lint/Bundles.py
index 67ae14fbd..472915cfd 100644
--- a/src/lib/Server/Lint/Bundles.py
+++ b/src/lib/Server/Lint/Bundles.py
@@ -10,11 +10,9 @@ class Bundles(Bcfg2.Server.Lint.ServerPlugin):
self.missing_bundles()
for bundle in self.core.plugins['Bundler'].entries.values():
if self.HandlesFile(bundle.name):
- if (Bcfg2.Server.Plugins.Bundler.have_genshi and
- type(bundle) is
+ if (not Bcfg2.Server.Plugins.Bundler.have_genshi or
+ type(bundle) is not
Bcfg2.Server.Plugins.SGenshi.SGenshiTemplateFile):
- self.sgenshi_groups(bundle)
- else:
self.bundle_names(bundle)
def missing_bundles(self):
diff --git a/src/lib/Server/Lint/Comments.py b/src/lib/Server/Lint/Comments.py
index 1ea5f295e..19fae1b08 100644
--- a/src/lib/Server/Lint/Comments.py
+++ b/src/lib/Server/Lint/Comments.py
@@ -57,7 +57,7 @@ class Comments(Bcfg2.Server.Lint.ServerPlugin):
try:
xdata = lxml.etree.XML(bundle.data)
rtype = "bundler"
- except AttributeError:
+ except (lxml.etree.XMLSyntaxError, AttributeError):
xdata = lxml.etree.parse(bundle.template.filepath).getroot()
rtype = "sgenshi"
diff --git a/src/lib/Server/Lint/RequiredAttrs.py b/src/lib/Server/Lint/RequiredAttrs.py
index 9f00a4e24..a94bbb3ed 100644
--- a/src/lib/Server/Lint/RequiredAttrs.py
+++ b/src/lib/Server/Lint/RequiredAttrs.py
@@ -67,7 +67,7 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin):
for bundle in self.core.plugins['Bundler'].entries.values():
try:
xdata = lxml.etree.XML(bundle.data)
- except AttributeError:
+ except (lxml.etree.XMLSyntaxError, AttributeError):
xdata = lxml.etree.parse(bundle.template.filepath).getroot()
for path in xdata.xpath("//BoundPath"):