summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-09 10:51:17 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-05-09 10:51:17 -0400
commitbc1394e2062983f3da22f9ec687db8e6de0567a0 (patch)
tree7761d12e4cd5241dccd524b48f1822852c1e4117 /src/lib/Bcfg2/Server/Lint
parentd98fee9781467d992895284c12123dc872158769 (diff)
downloadbcfg2-bc1394e2062983f3da22f9ec687db8e6de0567a0.tar.gz
bcfg2-bc1394e2062983f3da22f9ec687db8e6de0567a0.tar.bz2
bcfg2-bc1394e2062983f3da22f9ec687db8e6de0567a0.zip
fixed MergeFiles bcfg2-lint plugin
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint')
-rw-r--r--src/lib/Bcfg2/Server/Lint/MergeFiles.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/MergeFiles.py b/src/lib/Bcfg2/Server/Lint/MergeFiles.py
index 797de6ed9..68d010316 100644
--- a/src/lib/Bcfg2/Server/Lint/MergeFiles.py
+++ b/src/lib/Bcfg2/Server/Lint/MergeFiles.py
@@ -2,6 +2,7 @@ import os
import copy
from difflib import SequenceMatcher
import Bcfg2.Server.Lint
+from Bcfg2.Server.Plugins.Cfg import CfgGenerator
class MergeFiles(Bcfg2.Server.Lint.ServerPlugin):
""" find Probes or Cfg files with multiple similar files that
@@ -20,7 +21,9 @@ class MergeFiles(Bcfg2.Server.Lint.ServerPlugin):
def check_cfg(self):
for filename, entryset in self.core.plugins['Cfg'].entries.items():
- for mset in self.get_similar(entryset.entries):
+ candidates = dict([(f, e) for f, e in entryset.entries.items()
+ if isinstance(e, CfgGenerator)])
+ for mset in self.get_similar(candidates):
self.LintError("merge-cfg",
"The following files are similar: %s. "
"Consider merging them into a single Genshi "