From 0f7edd60e67d32438a8be42002faacde4e4a7649 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 9 Aug 2013 16:45:45 -0400 Subject: testsuite: fixed most pylint complaints --- src/lib/Bcfg2/Server/Lint/Cfg.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/lib/Bcfg2/Server/Lint/Cfg.py') 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 +` """ + + 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) -- cgit v1.2.3-1-g7c22