summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r--src/lib/Bcfg2/Server/Lint/Deltas.py14
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py2
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgGenshiGenerator.py2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/Deltas.py b/src/lib/Bcfg2/Server/Lint/Deltas.py
index de2e0668f..114f2e348 100644
--- a/src/lib/Bcfg2/Server/Lint/Deltas.py
+++ b/src/lib/Bcfg2/Server/Lint/Deltas.py
@@ -1,4 +1,5 @@
import Bcfg2.Server.Lint
+from Bcfg2.Server.Plugins.Cfg import CfgFilter
class Deltas(Bcfg2.Server.Lint.ServerPlugin):
""" Warn about usage of .cat and .diff files """
@@ -16,10 +17,9 @@ class Deltas(Bcfg2.Server.Lint.ServerPlugin):
"diff-file-used":"warning"}
def check_entry(self, basename, entry):
- for fname in list(entry.entries.keys()):
- if self.HandlesFile(fname):
- match = entry.specific.delta_reg.match(fname)
- if match:
- self.LintError("%s-file-used" % match.group('delta'),
- "%s file used on %s: %s" %
- (match.group('delta'), basename, fname))
+ for fname, processor in entry.entries.items():
+ if self.HandlesFile(fname) and isinstance(processor, CfgFilter):
+ extension = fname.split(".")[-1]
+ self.LintError("%s-file-used" % extension,
+ "%s file used on %s: %s" %
+ (extension, basename, fname))
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py
index 08f01e005..3edd1d8cb 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgCheetahGenerator.py
@@ -9,7 +9,7 @@ try:
import Cheetah.Template
import Cheetah.Parser
have_cheetah = True
-except:
+except ImportError:
have_cheetah = False
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgGenshiGenerator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgGenshiGenerator.py
index 5e3b37127..70a519969 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgGenshiGenerator.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgGenshiGenerator.py
@@ -9,7 +9,7 @@ try:
import genshi.core
from genshi.template import TemplateLoader, NewTextTemplate
have_genshi = True
-except:
+except ImportError:
have_genshi = False
# snipped from TGenshi