summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/RequiredAttrs.py')
-rw-r--r--src/lib/Bcfg2/Server/Lint/RequiredAttrs.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py b/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
index b9a6dc2dc..fcb7c6c28 100644
--- a/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
+++ b/src/lib/Bcfg2/Server/Lint/RequiredAttrs.py
@@ -5,9 +5,11 @@ import Bcfg2.Server.Lint
import Bcfg2.Client.Tools.POSIX
import Bcfg2.Client.Tools.VCS
from Bcfg2.Server.Plugins.Packages import Apt, Yum
-from Bcfg2.Server.Plugins.Bundler import have_genshi
-if have_genshi:
- from Bcfg2.Server.Plugins.SGenshi import SGenshiTemplateFile
+try:
+ from Bcfg2.Server.Plugins.Bundler import BundleTemplateFile
+ has_genshi = True
+except ImportError:
+ has_genshi = False
# format verifying functions
def is_filename(val):
@@ -157,8 +159,8 @@ class RequiredAttrs(Bcfg2.Server.Lint.ServerPlugin):
if 'Bundler' in self.core.plugins:
for bundle in self.core.plugins['Bundler'].entries.values():
if (self.HandlesFile(bundle.name) and
- (not have_genshi or
- not isinstance(bundle, SGenshiTemplateFile))):
+ (not has_genshi or
+ not isinstance(bundle, BundleTemplateFile))):
try:
xdata = lxml.etree.XML(bundle.data)
except (lxml.etree.XMLSyntaxError, AttributeError):