summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint/Deltas.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-09 09:36:30 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-09 09:36:30 -0400
commitdfea47363d1e85b953815781f956713f954cc1dd (patch)
treeef57a426c03eb63948367975da48f1f786537288 /src/lib/Bcfg2/Server/Lint/Deltas.py
parentc35347887bb3d452d6104b13308d853b3da44b68 (diff)
downloadbcfg2-dfea47363d1e85b953815781f956713f954cc1dd.tar.gz
bcfg2-dfea47363d1e85b953815781f956713f954cc1dd.tar.bz2
bcfg2-dfea47363d1e85b953815781f956713f954cc1dd.zip
fixed bcfg2-lint Deltas plugin
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/Deltas.py')
-rw-r--r--src/lib/Bcfg2/Server/Lint/Deltas.py14
1 files changed, 7 insertions, 7 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))