summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Lint/Cfg.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-09 16:45:45 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-09 16:45:45 -0400
commit0f7edd60e67d32438a8be42002faacde4e4a7649 (patch)
tree2b11b02f5bf4f9e7a6e609136bf2a19c8f166cc4 /src/lib/Bcfg2/Server/Lint/Cfg.py
parentcc11ada6b8871d7719fd0ea8a2ff382bba8a3bc2 (diff)
downloadbcfg2-0f7edd60e67d32438a8be42002faacde4e4a7649.tar.gz
bcfg2-0f7edd60e67d32438a8be42002faacde4e4a7649.tar.bz2
bcfg2-0f7edd60e67d32438a8be42002faacde4e4a7649.zip
testsuite: fixed most pylint complaints
Diffstat (limited to 'src/lib/Bcfg2/Server/Lint/Cfg.py')
-rw-r--r--src/lib/Bcfg2/Server/Lint/Cfg.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/Cfg.py b/src/lib/Bcfg2/Server/Lint/Cfg.py
index 4cdf5c48a..2cdb1f7b8 100644
--- a/src/lib/Bcfg2/Server/Lint/Cfg.py
+++ b/src/lib/Bcfg2/Server/Lint/Cfg.py
@@ -1,4 +1,10 @@
+""" ``bcfg2-lint`` plugin for :ref:`Cfg
+<server-plugins-generators-cfg>` """
+
+
import os
+import Bcfg2.Options
+from fnmatch import fnmatch
from Bcfg2.Server.Lint import ServerPlugin
@@ -55,7 +61,7 @@ class Cfg(ServerPlugin):
# first, collect ignore patterns from handlers
ignore = set()
- for hdlr in handlers():
+ for hdlr in cfg.handlers():
ignore.update(hdlr.__ignore__)
# next, get a list of all non-ignored files on the filesystem
@@ -67,9 +73,9 @@ class Cfg(ServerPlugin):
# global FAM ignore list
if (not any(fname.endswith("." + i) for i in ignore) and
not any(fnmatch(fpath, p)
- for p in self.config['ignore']) and
+ for p in Bcfg2.Options.setup.ignore_files) and
not any(fnmatch(c, p)
- for p in self.config['ignore']
+ for p in sBcfg2.Options.setup.ignore_files
for c in self._list_path_components(fpath))):
all_files.add(fpath)