summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-04-20 11:41:05 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-04-20 12:00:19 -0400
commit74fe7cebd6f5024dbf336fd37f06644a4011dabe (patch)
treec63a58a4a8d5e620d4e5e2a55e302a3995a3e731 /src/lib/Bcfg2
parentdcab5714d1d6147ef2a54cc44e01a3c17e9201ae (diff)
downloadbcfg2-74fe7cebd6f5024dbf336fd37f06644a4011dabe.tar.gz
bcfg2-74fe7cebd6f5024dbf336fd37f06644a4011dabe.tar.bz2
bcfg2-74fe7cebd6f5024dbf336fd37f06644a4011dabe.zip
made Deltas and Genshi lint plugins respect command-line filelist
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r--src/lib/Bcfg2/Server/Lint/Deltas.py12
-rwxr-xr-xsrc/lib/Bcfg2/Server/Lint/Genshi.py3
2 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/Deltas.py b/src/lib/Bcfg2/Server/Lint/Deltas.py
index 7627b0cb0..cf91d1d13 100644
--- a/src/lib/Bcfg2/Server/Lint/Deltas.py
+++ b/src/lib/Bcfg2/Server/Lint/Deltas.py
@@ -12,9 +12,9 @@ class Deltas(Bcfg2.Server.Lint.ServerPlugin):
def check_entry(self, basename, entry):
for fname in list(entry.entries.keys()):
- 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))
+ 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))
diff --git a/src/lib/Bcfg2/Server/Lint/Genshi.py b/src/lib/Bcfg2/Server/Lint/Genshi.py
index 739e829d0..c78366ae9 100755
--- a/src/lib/Bcfg2/Server/Lint/Genshi.py
+++ b/src/lib/Bcfg2/Server/Lint/Genshi.py
@@ -18,7 +18,8 @@ class Genshi(Bcfg2.Server.Lint.ServerPlugin):
for eset in entries.values():
for fname, sdata in list(eset.entries.items()):
- if fname.endswith(".genshi") or fname.endswith(".newtxt"):
+ if (self.HandlesFile(fname) and
+ (fname.endswith(".genshi") or fname.endswith(".newtxt"))):
try:
loader.load(sdata.name,
cls=genshi.template.NewTextTemplate)