From a6b6871ecbc700229969f350b869bd19e785129d Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 15 Aug 2012 14:53:18 -0400 Subject: Removed deprecated plugins BB, Svcmgr, SGenshi --- src/lib/Bcfg2/Server/Lint/GroupNames.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/lib/Bcfg2/Server/Lint/GroupNames.py') diff --git a/src/lib/Bcfg2/Server/Lint/GroupNames.py b/src/lib/Bcfg2/Server/Lint/GroupNames.py index 069d5d2a5..5df98a30e 100644 --- a/src/lib/Bcfg2/Server/Lint/GroupNames.py +++ b/src/lib/Bcfg2/Server/Lint/GroupNames.py @@ -1,9 +1,11 @@ import os import re import Bcfg2.Server.Lint -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 class GroupNames(Bcfg2.Server.Lint.ServerPlugin): """ ensure that all named groups are valid group names """ @@ -37,8 +39,8 @@ class GroupNames(Bcfg2.Server.Lint.ServerPlugin): """ check bundles for BoundPath entries with missing attrs """ 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))): self.check_entries(bundle.xdata.xpath("//Group"), bundle.name) -- cgit v1.2.3-1-g7c22